/*
Theme Name: RankHiker Blog
Theme URI: https://rankhiker.com
Author: RankHiker Team
Author URI: https://rankhiker.com
Description: Custom WordPress theme for RankHiker Blog - matching the main app's dark teal design.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rankhiker-blog
*/

/* ============================================
   CSS Variables (matching Next.js app)
   ============================================ */
:root {
  --brand: #000000;
  --brand-secondary: #00cfbd;
  --accent-teal: #00cfbd;
  --radius: 1rem;

  /* Light Mode (Default) */
  --bg-dark: #ffffff;
  --bg-card: #f5f5f5;
  --bg-card-hover: #ebebeb;
  --text-primary: #000000;
  --text-secondary: #525252;
  --text-muted: #737373;
  --border-color: rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.8);
  --code-bg: rgba(0, 207, 189, 0.08);
  --pre-bg: #f5f5f5;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Dark Mode */
body.dark-mode {
  --bg-dark: #09090b;
  --bg-card: #171717;
  --bg-card-hover: #262626;
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  --border-color: rgba(255, 255, 255, 0.1);
  --header-bg: rgba(9, 9, 11, 0.8);
  --code-bg: rgba(0, 207, 189, 0.1);
  --pre-bg: #1a1a1a;
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ============================================
   Navigation
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
  white-space: nowrap;
}

.nav-logo span {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

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

.nav-logo .custom-logo-link {
  display: flex;
  align-items: center;
}

.nav-logo .custom-logo-link img,
.nav-logo .custom-logo,
.nav-logo img.custom-logo {
  height: 32px !important;
  width: auto !important;
  max-height: 32px !important;
  max-width: 120px !important;
  object-fit: contain;
}

/* Footer logo */
.footer-logo img {
  height: 28px !important;
  width: auto !important;
  max-height: 28px !important;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

/* Direct nav links (Pricing, Blog) */
.nav-link-direct {
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link-direct:hover {
  color: var(--text-primary);
}

/* ============================================
   Dropdown Navigation
   ============================================ */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  font-family: inherit;
  white-space: nowrap;
}

.nav-dropdown-trigger:hover {
  color: var(--text-primary);
}

.nav-dropdown-trigger .chevron {
  transition: transform 0.2s;
}

.nav-dropdown.open .nav-dropdown-trigger {
  color: var(--text-primary);
}

.nav-dropdown.open .nav-dropdown-trigger .chevron {
  transform: rotate(180deg);
}

/* Mega Menu (2 column) */
.mega-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  padding: 1.5rem;
  z-index: 200;
  animation: dropdownFadeIn 0.2s ease;
}

body.dark-mode .mega-menu {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.mega-2col {
  width: 560px;
  max-width: 90vw;
}

.mega-2col .mega-col {
  display: flex;
  flex-direction: column;
}

.nav-dropdown.open .mega-menu,
.nav-dropdown.open .dropdown-menu {
  display: flex;
  gap: 2rem;
}

.nav-dropdown.open .dropdown-menu {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mega-col {
  flex: 1;
  min-width: 0;
}

.mega-col-title {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
}

.mega-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.mega-item:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.mega-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.6;
}

.mega-item:hover .mega-icon {
  opacity: 1;
}

.mega-view-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.15s;
}

.mega-view-all:hover {
  background: var(--bg-card);
  color: var(--accent-teal);
}

.mega-view-all svg {
  transition: transform 0.2s;
}

.mega-view-all:hover svg {
  transform: translateX(4px);
  color: var(--accent-teal);
}

/* Small Dropdown (Solutions, Resources) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 288px;
  background: var(--bg-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  z-index: 200;
  animation: dropdownFadeIn 0.2s ease;
}

body.dark-mode .dropdown-menu {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.dropdown-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
}

.dropdown-item:hover {
  background: var(--bg-card);
}

.dropdown-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.dropdown-item:hover .dropdown-icon {
  color: var(--text-secondary);
}

.dropdown-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.dropdown-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

/* Dropdown overlay to close */
.dropdown-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.dropdown-menu {
  animation-name: dropdownFadeInLeft;
}

@keyframes dropdownFadeInLeft {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  white-space: nowrap;
}

.btn-login {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.btn-login:hover {
  color: var(--text-primary);
}

.btn-try-free {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  background: var(--text-primary);
  color: var(--bg-dark);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
}

.btn-try-free:hover {
  opacity: 0.9;
}

/* Mobile menu */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: background 0.15s;
}

.mobile-menu-btn:hover {
  background: var(--bg-card);
}

@media (max-width: 1024px) {
  .nav-links {
    display: none;
  }
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  overflow: visible;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.1;
}

.hero p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 42rem;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.875rem;
  }
}

/* ============================================
   Categories Filter
   ============================================ */
.categories {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.category-btn {
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-card);
  color: var(--text-secondary);
}

.category-btn:hover {
  background: rgba(0, 207, 189, 0.1);
  color: var(--text-primary);
}

.category-btn.active {
  background: var(--accent-teal);
  color: #000000;
}

/* ============================================
   Featured Post (Hero Card)
   ============================================ */
.featured-post-section {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
}

.featured-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  transition: all 0.3s;
}

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

.featured-card-link {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-decoration: none;
  color: inherit;
}

.featured-card-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: rgba(0, 207, 189, 0.1);
}

.featured-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.featured-card:hover .featured-card-image img {
  transform: scale(1.03);
}

.featured-card-image .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  background: rgba(0, 207, 189, 0.1);
}

.featured-card-content {
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  line-height: 1.3;
  transition: color 0.2s;
}

.featured-card:hover .featured-title {
  color: var(--accent-teal);
}

.featured-excerpt {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.featured-read-more {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.25rem;
  background: var(--accent-teal);
  color: #000;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9999px;
  transition: opacity 0.2s;
  width: fit-content;
  margin-bottom: 1.5rem;
}

.featured-card:hover .featured-read-more {
  opacity: 0.9;
}

@media (max-width: 768px) {
  .featured-card-link {
    grid-template-columns: 1fr;
  }
  .featured-card-image {
    aspect-ratio: 16/9;
  }
  .featured-card-content {
    padding: 1.5rem;
  }
  .featured-title {
    font-size: 1.375rem;
  }
}

/* ============================================
   Post Author (Card footer)
   ============================================ */
.post-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.post-author-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.featured-card .post-author-avatar {
  width: 32px;
  height: 32px;
}

.post-author-name {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ============================================
   Blog Posts Grid
   ============================================ */
.posts-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

/* ============================================
   Blog Card
   ============================================ */
.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
  box-shadow: var(--shadow-card);
}

.post-card a {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

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

.post-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(0, 207, 189, 0.1);
}

.post-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.post-card:hover .post-card-image img {
  transform: scale(1.05);
}

.post-card-image .placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  background: rgba(0, 207, 189, 0.1);
}

.post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-teal);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.post-card-body h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card:hover .post-card-body h2 {
  color: var(--accent-teal);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-meta svg {
  width: 12px;
  height: 12px;
  margin-right: 4px;
}

.post-meta span {
  display: flex;
  align-items: center;
}

.no-posts {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.no-posts h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.no-posts p {
  color: var(--text-secondary);
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter {
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 1.5rem 5rem;
}

.newsletter-box {
  background: var(--accent-teal);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
}

.newsletter-box h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1rem;
}

.newsletter-box p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 28rem;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 0.875rem;
  outline: none;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.newsletter-form button:hover {
  opacity: 0.9;
}

@media (max-width: 640px) {
  .newsletter-form {
    flex-direction: column;
  }
  .newsletter-box {
    padding: 2rem;
  }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: #0a0a0a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4rem 0 2rem;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-col h4 {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #a3a3a3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

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

.footer-col li {
  margin-bottom: 0.625rem;
}

.footer-col a {
  font-size: 0.875rem;
  color: #737373;
  transition: color 0.2s;
}

.footer-col a:hover {
  color: #ffffff;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.8125rem;
  color: #737373;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-bottom-left {
  flex-shrink: 0;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.025em;
}

.footer-bottom-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .footer-bottom-center {
    align-items: flex-start;
  }
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  color: #737373;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #ffffff;
}

.footer-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.footer-social a {
  color: #737373;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #ffffff;
}

/* ============================================
   Single Post
   ============================================ */
article.single-post {
  max-width: 48rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

article.single-post .post-header {
  margin-bottom: 2rem;
}

article.single-post .post-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  article.single-post .post-header h1 {
    font-size: 1.75rem;
  }
}

article.single-post .post-header .meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

article.single-post .featured-image {
  margin-bottom: 2rem;
  border-radius: var(--radius);
  overflow: hidden;
}

article.single-post .featured-image img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

/* Article Content (Prose) */
.post-content {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  line-height: 1.8;
}

.post-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 2.5rem 0 1rem;
}

.post-content h3 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 2rem 0 0.75rem;
}

.post-content h4 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.5rem 0 0.5rem;
}

.post-content p {
  margin-bottom: 1.25rem;
}

.post-content a {
  color: var(--accent-teal);
  text-decoration: underline;
}

.post-content a:hover {
  opacity: 0.8;
}

.post-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

.post-content ul, .post-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.post-content li {
  margin-bottom: 0.5rem;
}

.post-content blockquote {
  border-left: 3px solid var(--accent-teal);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(0, 207, 189, 0.05);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

.post-content code {
  background: var(--code-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  color: var(--accent-teal);
}

.post-content pre {
  background: var(--pre-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.post-content pre code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
}

.post-content img {
  border-radius: 0.75rem;
  margin: 1.5rem 0;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.post-content th, .post-content td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.post-content th {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
}

/* Tags */
.post-tags {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.post-tag {
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  background: rgba(0, 207, 189, 0.1);
  color: var(--accent-teal);
  transition: background 0.2s;
}

.post-tag:hover {
  background: rgba(0, 207, 189, 0.2);
}

/* Author Box */
.author-box {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

.author-avatar {
  border-radius: 9999px;
  width: 64px;
  height: 64px;
}

.author-name {
  color: var(--text-primary);
  font-size: 0.875rem;
}

.author-bio {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Related Posts */
.related-posts {
  margin-top: 4rem;
}

.related-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}

.pagination a:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.pagination .current {
  background: var(--accent-teal);
  color: #000000;
  border-color: var(--accent-teal);
}

/* ============================================
   Sidebar / Widget Area
   ============================================ */
.sidebar {
  padding: 2rem 0;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.widget h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.widget ul {
  list-style: none;
}

.widget li {
  margin-bottom: 0.5rem;
}

.widget a {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.widget a:hover {
  color: var(--accent-teal);
}

/* ============================================
   Search Form
   ============================================ */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input {
  flex: 1;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-size: 0.875rem;
  outline: none;
}

.search-form input:focus {
  border-color: var(--accent-teal);
}

.search-form button {
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  background: var(--accent-teal);
  color: #000000;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
}

/* ============================================
   404 Page
   ============================================ */
.error-404 {
  max-width: 42rem;
  margin: 0 auto;
  padding: 6rem 1.5rem;
  text-align: center;
}

.error-404 h1 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent-teal);
  margin-bottom: 1rem;
}

.error-404 p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.error-404 a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  background: var(--accent-teal);
  color: #000000;
  font-weight: 600;
}

/* ============================================
   Utility
   ============================================ */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ============================================
   Dark Mode Toggle
   ============================================ */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.theme-toggle:hover svg {
  transform: rotate(15deg);
}

.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

body.dark-mode .theme-toggle .icon-sun {
  display: block;
}

body.dark-mode .theme-toggle .icon-moon {
  display: none;
}

/* ============================================
   Hero Gradient (Dark Mode Enhancement)
   ============================================ */
body.dark-mode .hero::before {
  background: radial-gradient(ellipse at center, rgba(0, 207, 189, 0.15) 0%, rgba(0, 207, 189, 0.05) 40%, transparent 70%);
}

/* ============================================
   Mobile Nav Responsive
   ============================================ */
@media (max-width: 1024px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    gap: 0;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  }

  body.dark-mode .nav-links {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  /* Mobile dropdown adjustments */
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-trigger {
    width: 100%;
    justify-content: space-between;
    padding: 0.75rem;
  }

  .nav-link-direct {
    display: block;
    padding: 0.75rem;
  }

  .mega-menu,
  .dropdown-menu {
    position: static;
    transform: none;
    width: 100% !important;
    max-width: 100% !important;
    border: none;
    box-shadow: none;
    background: var(--bg-card);
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    animation: none;
  }

  .nav-dropdown.open .mega-menu {
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
  }

  .nav-dropdown.open .dropdown-menu {
    padding: 0.5rem;
  }
}

@media (min-width: 1025px) {
  .mobile-menu-btn {
    display: none;
  }
}

/* ============================================
   Smooth Transitions
   ============================================ */
.post-card,
.category-btn,
.widget,
.newsletter-box {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   Light Mode Specific Tweaks
   ============================================ */
.post-card-image .placeholder {
  background: rgba(0, 207, 189, 0.08);
}

body.dark-mode .post-card-image .placeholder {
  background: rgba(0, 207, 189, 0.1);
}

/* Newsletter in light mode */
.newsletter-form input {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}
