/*
Theme Name: Nexus
Theme URI: https://nexustheme.com
Author: Nexus Team
Author URI: https://nexustheme.com
Description: Nexus is a powerful multipurpose WordPress theme supporting blogs, portfolios, news sites, and WooCommerce stores. Fully customizable with a clean, modern design.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nexus
Tags: blog, portfolio, e-commerce, news, one-column, two-columns, three-columns, four-columns, left-sidebar, right-sidebar, custom-background, custom-colors, custom-header, custom-logo, custom-menu, featured-images, footer-widgets, full-width-template, post-formats, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, block-styles, wide-blocks, accessibility-ready
*/

/* =============================================
   NEXUS THEME - MAIN STYLESHEET
   ============================================= */

:root {
  /* Primary Colors */
  --nexus-primary: #1a73e8;
  --nexus-primary-dark: #1557b0;
  --nexus-primary-light: #4a9eff;
  --nexus-secondary: #ff6b35;
  --nexus-accent: #00c897;

  /* Neutral Colors */
  --nexus-dark: #0d1117;
  --nexus-gray-900: #1a1a2e;
  --nexus-gray-800: #2d2d44;
  --nexus-gray-700: #444466;
  --nexus-gray-600: #666688;
  --nexus-gray-500: #8888aa;
  --nexus-gray-400: #aaaacc;
  --nexus-gray-300: #ccccdd;
  --nexus-gray-200: #e8e8f0;
  --nexus-gray-100: #f5f5fa;
  --nexus-white: #ffffff;

  /* Typography */
  --nexus-font-heading: 'Playfair Display', Georgia, serif;
  --nexus-font-body: 'Source Sans 3', 'Helvetica Neue', sans-serif;
  --nexus-font-mono: 'JetBrains Mono', 'Courier New', monospace;
  --nexus-font-ui: 'DM Sans', system-ui, sans-serif;

  /* Spacing */
  --nexus-spacing-xs: 0.25rem;
  --nexus-spacing-sm: 0.5rem;
  --nexus-spacing-md: 1rem;
  --nexus-spacing-lg: 1.5rem;
  --nexus-spacing-xl: 2rem;
  --nexus-spacing-2xl: 3rem;
  --nexus-spacing-3xl: 4rem;
  --nexus-spacing-4xl: 6rem;

  /* Borders */
  --nexus-radius-sm: 4px;
  --nexus-radius-md: 8px;
  --nexus-radius-lg: 16px;
  --nexus-radius-xl: 24px;
  --nexus-radius-full: 9999px;

  /* Shadows */
  --nexus-shadow-sm: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --nexus-shadow-md: 0 4px 12px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --nexus-shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
  --nexus-shadow-xl: 0 20px 60px rgba(0,0,0,0.15), 0 8px 16px rgba(0,0,0,0.08);

  /* Transitions */
  --nexus-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nexus-transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --nexus-container-width: 1280px;
  --nexus-sidebar-width: 320px;
  --nexus-header-height: 72px;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--nexus-font-body);
  color: var(--nexus-gray-800);
  background: var(--nexus-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--nexus-primary); text-decoration: none; transition: color var(--nexus-transition); }
a:hover { color: var(--nexus-primary-dark); }
ul, ol { list-style: none; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--nexus-font-heading);
  line-height: 1.25;
  color: var(--nexus-gray-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.875rem); }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1.25rem; }
p:last-child { margin-bottom: 0; }

/* ---- Layout ---- */
.nexus-container {
  max-width: var(--nexus-container-width);
  margin: 0 auto;
  padding: 0 var(--nexus-spacing-xl);
}

.nexus-container--narrow { max-width: 860px; }
.nexus-container--wide { max-width: 1440px; }

.site-content { padding: var(--nexus-spacing-3xl) 0; }

/* ---- Header ---- */
#masthead {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--nexus-gray-200);
  height: var(--nexus-header-height);
  transition: box-shadow var(--nexus-transition);
}

#masthead.scrolled { box-shadow: var(--nexus-shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--nexus-spacing-xl);
}

/* Logo */
.site-branding { display: flex; align-items: center; gap: var(--nexus-spacing-md); flex-shrink: 0; }
.custom-logo { max-height: 48px; width: auto; }
.site-title { font-family: var(--nexus-font-heading); font-size: 1.5rem; font-weight: 800; color: var(--nexus-gray-900); letter-spacing: -0.03em; }
.site-title a { color: inherit; }
.site-description { font-size: 0.75rem; color: var(--nexus-gray-500); margin: 0; font-family: var(--nexus-font-ui); }

/* Primary Navigation */
#primary-navigation { display: flex; align-items: center; }

.primary-menu {
  display: flex;
  align-items: center;
  gap: var(--nexus-spacing-xs);
}

.primary-menu > li { position: relative; }

.primary-menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 0.875rem;
  font-family: var(--nexus-font-ui);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nexus-gray-700);
  border-radius: var(--nexus-radius-sm);
  transition: all var(--nexus-transition);
  white-space: nowrap;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a {
  color: var(--nexus-primary);
  background: rgba(26,115,232,0.08);
}

/* Dropdown */
.primary-menu .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--nexus-white);
  border-radius: var(--nexus-radius-md);
  box-shadow: var(--nexus-shadow-xl);
  border: 1px solid var(--nexus-gray-200);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--nexus-transition);
  z-index: 100;
}

.primary-menu li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.primary-menu .sub-menu li a {
  display: block;
  padding: 0.5rem 0.875rem;
  font-family: var(--nexus-font-ui);
  font-size: 0.875rem;
  color: var(--nexus-gray-700);
  border-radius: var(--nexus-radius-sm);
  transition: all var(--nexus-transition);
}

.primary-menu .sub-menu li a:hover { background: var(--nexus-gray-100); color: var(--nexus-primary); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: var(--nexus-spacing-sm); flex-shrink: 0; }

.header-search-btn,
.header-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--nexus-gray-600);
  cursor: pointer;
  border-radius: var(--nexus-radius-sm);
  transition: all var(--nexus-transition);
  font-size: 1.1rem;
  position: relative;
}

.header-search-btn:hover,
.header-cart-btn:hover { background: var(--nexus-gray-100); color: var(--nexus-primary); }

.cart-count {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: var(--nexus-secondary);
  color: white;
  border-radius: 50%;
  font-size: 0.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--nexus-font-ui);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  background: transparent;
  border-radius: var(--nexus-radius-sm);
  transition: background var(--nexus-transition);
}

.menu-toggle:hover { background: var(--nexus-gray-100); }
.menu-toggle span { display: block; width: 22px; height: 2px; background: var(--nexus-gray-700); border-radius: 2px; transition: all var(--nexus-transition); }
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---- Search Overlay ---- */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13,17,23,0.9);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--nexus-transition);
}

.search-overlay.active { opacity: 1; visibility: visible; }

.search-overlay-inner { width: min(640px, 90vw); }

.search-overlay .search-form { position: relative; }

.search-overlay input[type="search"] {
  width: 100%;
  padding: 1rem 3.5rem 1rem 1.5rem;
  font-size: 1.25rem;
  font-family: var(--nexus-font-ui);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--nexus-radius-lg);
  color: white;
  outline: none;
  transition: border-color var(--nexus-transition);
}

.search-overlay input::placeholder { color: rgba(255,255,255,0.4); }
.search-overlay input:focus { border-color: var(--nexus-primary-light); }

.search-overlay-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--nexus-transition);
}

.search-overlay-close:hover { color: white; }

/* ---- Hero / Banner ---- */
.nexus-hero {
  position: relative;
  overflow: hidden;
  background: var(--nexus-gray-900);
  color: white;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.nexus-hero__bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.4;
}

.nexus-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,17,23,0.8) 0%, rgba(26,115,232,0.3) 100%);
}

.nexus-hero__content { position: relative; z-index: 1; padding: var(--nexus-spacing-4xl) 0; }

.nexus-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.875rem;
  background: var(--nexus-primary);
  color: white;
  border-radius: var(--nexus-radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--nexus-font-ui);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--nexus-spacing-lg);
}

.nexus-hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  color: white;
  margin-bottom: var(--nexus-spacing-lg);
  max-width: 800px;
}

.nexus-hero__excerpt { font-size: 1.125rem; color: rgba(255,255,255,0.75); max-width: 600px; margin-bottom: var(--nexus-spacing-xl); }

.nexus-hero__meta { display: flex; align-items: center; gap: var(--nexus-spacing-lg); flex-wrap: wrap; }

.nexus-hero__author { display: flex; align-items: center; gap: 0.75rem; }
.nexus-hero__author img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.3); }
.nexus-hero__author-name { font-family: var(--nexus-font-ui); font-size: 0.875rem; font-weight: 600; color: white; }
.nexus-hero__date { font-family: var(--nexus-font-ui); font-size: 0.875rem; color: rgba(255,255,255,0.6); }

/* ---- Buttons ---- */
.nexus-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--nexus-radius-md);
  font-family: var(--nexus-font-ui);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--nexus-transition);
  text-decoration: none;
  white-space: nowrap;
}

.nexus-btn--primary {
  background: var(--nexus-primary);
  color: white;
  border-color: var(--nexus-primary);
}

.nexus-btn--primary:hover {
  background: var(--nexus-primary-dark);
  border-color: var(--nexus-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(26,115,232,0.3);
}

.nexus-btn--secondary {
  background: transparent;
  color: white;
  border-color: rgba(255,255,255,0.4);
}

.nexus-btn--secondary:hover { background: rgba(255,255,255,0.1); border-color: white; color: white; }

.nexus-btn--outline {
  background: transparent;
  color: var(--nexus-primary);
  border-color: var(--nexus-primary);
}

.nexus-btn--outline:hover { background: var(--nexus-primary); color: white; }

.nexus-btn--sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.nexus-btn--lg { padding: 1rem 2rem; font-size: 1rem; }

/* ---- Cards ---- */
.nexus-card {
  background: var(--nexus-white);
  border-radius: var(--nexus-radius-lg);
  overflow: hidden;
  transition: all var(--nexus-transition-slow);
  border: 1px solid var(--nexus-gray-200);
}

.nexus-card:hover { transform: translateY(-4px); box-shadow: var(--nexus-shadow-xl); border-color: transparent; }

.nexus-card__thumb { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.nexus-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1); }
.nexus-card:hover .nexus-card__thumb img { transform: scale(1.06); }

.nexus-card__thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--nexus-transition);
}

.nexus-card:hover .nexus-card__thumb-overlay { opacity: 1; }

.nexus-card__category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1;
}

.nexus-card__body { padding: var(--nexus-spacing-lg); }

.nexus-card__meta {
  display: flex;
  align-items: center;
  gap: var(--nexus-spacing-md);
  margin-bottom: 0.75rem;
  font-family: var(--nexus-font-ui);
  font-size: 0.8rem;
  color: var(--nexus-gray-500);
}

.nexus-card__title {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
  line-height: 1.4;
  font-family: var(--nexus-font-heading);
}

.nexus-card__title a { color: var(--nexus-gray-900); }
.nexus-card__title a:hover { color: var(--nexus-primary); }

.nexus-card__excerpt { font-size: 0.9rem; color: var(--nexus-gray-600); line-height: 1.6; margin-bottom: 0; }

.nexus-card__footer {
  padding: var(--nexus-spacing-md) var(--nexus-spacing-lg);
  border-top: 1px solid var(--nexus-gray-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nexus-spacing-sm);
}

/* ---- Category Badge ---- */
.nexus-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: var(--nexus-radius-full);
  font-family: var(--nexus-font-ui);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--nexus-primary);
  color: white;
}

.nexus-badge--secondary { background: var(--nexus-secondary); }
.nexus-badge--accent { background: var(--nexus-accent); }
.nexus-badge--gray { background: var(--nexus-gray-200); color: var(--nexus-gray-700); }

/* ---- Grid Layouts ---- */
.nexus-grid { display: grid; gap: var(--nexus-spacing-xl); }
.nexus-grid--2 { grid-template-columns: repeat(2, 1fr); }
.nexus-grid--3 { grid-template-columns: repeat(3, 1fr); }
.nexus-grid--4 { grid-template-columns: repeat(4, 1fr); }
.nexus-grid--1-2 { grid-template-columns: 1fr 2fr; }
.nexus-grid--2-1 { grid-template-columns: 2fr 1fr; }

/* ---- Section Headers ---- */
.nexus-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: var(--nexus-spacing-2xl);
  gap: var(--nexus-spacing-xl);
}

.nexus-section-header__left { flex: 1; }

.nexus-section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--nexus-font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--nexus-primary);
  margin-bottom: 0.5rem;
}

.nexus-section-tag::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.nexus-section-title { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--nexus-gray-900); }
.nexus-section-subtitle { color: var(--nexus-gray-500); font-size: 1rem; margin-top: 0.5rem; margin-bottom: 0; }

/* ---- Sidebar ---- */
.content-area { display: grid; gap: var(--nexus-spacing-3xl); }
.content-area.has-sidebar { grid-template-columns: 1fr var(--nexus-sidebar-width); align-items: start; }
.content-area.sidebar-left { grid-template-columns: var(--nexus-sidebar-width) 1fr; }
.content-area.sidebar-left .primary { order: 2; }
.content-area.sidebar-left #secondary { order: 1; }

.widget { margin-bottom: var(--nexus-spacing-2xl); }
.widget:last-child { margin-bottom: 0; }
.widget-title {
  font-size: 1rem;
  font-family: var(--nexus-font-ui);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nexus-gray-900);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--nexus-primary);
  margin-bottom: var(--nexus-spacing-lg);
}

/* ---- Posts List (Blog) ---- */
.nexus-posts-list { display: flex; flex-direction: column; gap: var(--nexus-spacing-2xl); }

.nexus-post-item { display: grid; grid-template-columns: 280px 1fr; gap: var(--nexus-spacing-xl); align-items: start; padding-bottom: var(--nexus-spacing-2xl); border-bottom: 1px solid var(--nexus-gray-200); }
.nexus-post-item:last-child { border-bottom: none; padding-bottom: 0; }

.nexus-post-item__thumb { border-radius: var(--nexus-radius-md); overflow: hidden; aspect-ratio: 4/3; }
.nexus-post-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.nexus-post-item__thumb:hover img { transform: scale(1.05); }

.nexus-post-item__meta { display: flex; align-items: center; gap: var(--nexus-spacing-md); margin-bottom: 0.75rem; font-family: var(--nexus-font-ui); font-size: 0.8rem; color: var(--nexus-gray-500); flex-wrap: wrap; }
.nexus-post-item__title { font-size: 1.375rem; margin-bottom: 0.75rem; }
.nexus-post-item__title a { color: var(--nexus-gray-900); }
.nexus-post-item__title a:hover { color: var(--nexus-primary); }
.nexus-post-item__excerpt { color: var(--nexus-gray-600); margin-bottom: var(--nexus-spacing-md); font-size: 0.95rem; }

/* ---- Single Post ---- */
.nexus-single .entry-header { margin-bottom: var(--nexus-spacing-2xl); }
.nexus-single .entry-title { font-size: clamp(1.75rem, 4vw, 3rem); margin-bottom: var(--nexus-spacing-lg); }
.nexus-single .entry-meta { display: flex; align-items: center; gap: var(--nexus-spacing-lg); flex-wrap: wrap; padding: var(--nexus-spacing-lg) 0; border-top: 1px solid var(--nexus-gray-200); border-bottom: 1px solid var(--nexus-gray-200); margin-bottom: var(--nexus-spacing-xl); }
.nexus-single .entry-featured-image { border-radius: var(--nexus-radius-lg); overflow: hidden; margin-bottom: var(--nexus-spacing-2xl); aspect-ratio: 16/7; }
.nexus-single .entry-featured-image img { width: 100%; height: 100%; object-fit: cover; }

.entry-content { font-size: 1.0625rem; line-height: 1.85; color: var(--nexus-gray-700); }
.entry-content h2, .entry-content h3, .entry-content h4 { margin-top: 2em; margin-bottom: 0.75em; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content blockquote { border-left: 4px solid var(--nexus-primary); padding: 1.5rem 2rem; background: var(--nexus-gray-100); border-radius: 0 var(--nexus-radius-md) var(--nexus-radius-md) 0; margin: 2em 0; font-style: italic; font-size: 1.1rem; color: var(--nexus-gray-700); }
.entry-content img { border-radius: var(--nexus-radius-md); margin: 1.5em 0; }
.entry-content ul, .entry-content ol { padding-left: 1.5rem; margin-bottom: 1.5em; }
.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content code { background: var(--nexus-gray-100); padding: 0.15em 0.4em; border-radius: 4px; font-family: var(--nexus-font-mono); font-size: 0.875em; color: var(--nexus-secondary); }
.entry-content pre { background: var(--nexus-gray-900); color: var(--nexus-gray-100); padding: 1.5rem; border-radius: var(--nexus-radius-md); overflow-x: auto; margin: 1.5em 0; }
.entry-content pre code { background: transparent; color: inherit; padding: 0; font-size: 0.9rem; }

/* ---- Author Box ---- */
.nexus-author-box {
  display: flex;
  gap: var(--nexus-spacing-xl);
  padding: var(--nexus-spacing-xl);
  background: var(--nexus-gray-100);
  border-radius: var(--nexus-radius-lg);
  margin-top: var(--nexus-spacing-2xl);
}

.nexus-author-box__avatar img { width: 80px; height: 80px; border-radius: 50%; flex-shrink: 0; }
.nexus-author-box__name { font-size: 1.125rem; margin-bottom: 0.25rem; }
.nexus-author-box__bio { font-size: 0.9rem; color: var(--nexus-gray-600); margin-bottom: 0; }

/* ---- Tags ---- */
.nexus-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: var(--nexus-spacing-xl); }
.nexus-tag { display: inline-flex; padding: 0.3rem 0.75rem; background: var(--nexus-gray-100); border-radius: var(--nexus-radius-full); font-size: 0.8rem; font-family: var(--nexus-font-ui); color: var(--nexus-gray-600); transition: all var(--nexus-transition); }
.nexus-tag:hover { background: var(--nexus-primary); color: white; }

/* ---- Pagination ---- */
.nexus-pagination { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: var(--nexus-spacing-3xl); }

.nexus-pagination a,
.nexus-pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--nexus-radius-md);
  font-family: var(--nexus-font-ui);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--nexus-gray-200);
  transition: all var(--nexus-transition);
  color: var(--nexus-gray-700);
}

.nexus-pagination a:hover,
.nexus-pagination .current {
  background: var(--nexus-primary);
  border-color: var(--nexus-primary);
  color: white;
}

/* ---- Comments ---- */
.nexus-comments { margin-top: var(--nexus-spacing-3xl); }
.comments-title { font-size: 1.5rem; margin-bottom: var(--nexus-spacing-xl); padding-bottom: var(--nexus-spacing-md); border-bottom: 2px solid var(--nexus-gray-200); }

.comment-list { display: flex; flex-direction: column; gap: var(--nexus-spacing-xl); }
.comment { padding: var(--nexus-spacing-xl); background: var(--nexus-gray-100); border-radius: var(--nexus-radius-md); }
.comment-author { display: flex; align-items: center; gap: var(--nexus-spacing-md); margin-bottom: 0.75rem; }
.comment-author img { border-radius: 50%; width: 44px; height: 44px; }
.comment-author b { font-family: var(--nexus-font-ui); font-size: 0.95rem; }
.comment-meta { font-size: 0.8rem; color: var(--nexus-gray-500); font-family: var(--nexus-font-ui); }
.comment-content { font-size: 0.95rem; }
.children { margin-left: var(--nexus-spacing-2xl); margin-top: var(--nexus-spacing-xl); display: flex; flex-direction: column; gap: var(--nexus-spacing-xl); }

/* ---- Comment Form ---- */
.comment-respond { margin-top: var(--nexus-spacing-3xl); }
.comment-reply-title { font-size: 1.5rem; margin-bottom: var(--nexus-spacing-xl); }
.comment-form { display: grid; gap: var(--nexus-spacing-md); }
.comment-form .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--nexus-spacing-md); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--nexus-gray-300);
  border-radius: var(--nexus-radius-md);
  font-family: var(--nexus-font-ui);
  font-size: 0.9rem;
  transition: border-color var(--nexus-transition);
  outline: none;
  background: var(--nexus-white);
}

.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--nexus-primary); box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.comment-form textarea { resize: vertical; min-height: 150px; }

/* ---- Portfolio ---- */
.nexus-portfolio-filter {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: var(--nexus-spacing-2xl);
}

.nexus-filter-btn {
  padding: 0.4rem 1rem;
  border: 1px solid var(--nexus-gray-300);
  border-radius: var(--nexus-radius-full);
  font-family: var(--nexus-font-ui);
  font-size: 0.85rem;
  cursor: pointer;
  background: transparent;
  transition: all var(--nexus-transition);
  color: var(--nexus-gray-600);
}

.nexus-filter-btn.active,
.nexus-filter-btn:hover {
  background: var(--nexus-primary);
  border-color: var(--nexus-primary);
  color: white;
}

.nexus-portfolio-item { position: relative; border-radius: var(--nexus-radius-lg); overflow: hidden; cursor: pointer; }
.nexus-portfolio-item__thumb { aspect-ratio: 4/3; }
.nexus-portfolio-item__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.nexus-portfolio-item:hover .nexus-portfolio-item__thumb img { transform: scale(1.08); }

.nexus-portfolio-item__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13,17,23,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--nexus-transition-slow);
  display: flex;
  align-items: flex-end;
  padding: var(--nexus-spacing-lg);
}

.nexus-portfolio-item:hover .nexus-portfolio-item__overlay { opacity: 1; }
.nexus-portfolio-item__title { color: white; font-size: 1.125rem; margin-bottom: 0.25rem; }
.nexus-portfolio-item__cat { color: rgba(255,255,255,0.7); font-size: 0.8rem; font-family: var(--nexus-font-ui); }

/* ---- WooCommerce ---- */
.nexus-product-card { border-radius: var(--nexus-radius-lg); overflow: hidden; border: 1px solid var(--nexus-gray-200); transition: all var(--nexus-transition-slow); }
.nexus-product-card:hover { transform: translateY(-4px); box-shadow: var(--nexus-shadow-lg); }

.nexus-product-card__thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--nexus-gray-100); }
.nexus-product-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.nexus-product-card:hover .nexus-product-card__thumb img { transform: scale(1.05); }

.nexus-product-card__actions {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--nexus-spacing-md);
  display: flex;
  gap: 0.5rem;
  transform: translateY(100%);
  transition: transform var(--nexus-transition);
}

.nexus-product-card:hover .nexus-product-card__actions { transform: translateY(0); }

.nexus-product-card__badge { position: absolute; top: 0.75rem; left: 0.75rem; }
.nexus-product-card__wishlist { position: absolute; top: 0.75rem; right: 0.75rem; width: 36px; height: 36px; border-radius: 50%; background: white; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: var(--nexus-shadow-sm); transition: all var(--nexus-transition); color: var(--nexus-gray-500); }
.nexus-product-card__wishlist:hover { color: var(--nexus-secondary); transform: scale(1.1); }

.nexus-product-card__body { padding: var(--nexus-spacing-md); }
.nexus-product-card__cat { font-family: var(--nexus-font-ui); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--nexus-gray-500); margin-bottom: 0.4rem; }
.nexus-product-card__title { font-size: 1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.nexus-product-card__title a { color: var(--nexus-gray-900); }
.nexus-product-card__title a:hover { color: var(--nexus-primary); }

.nexus-product-card__price { display: flex; align-items: center; gap: 0.5rem; }
.nexus-price { font-family: var(--nexus-font-ui); font-weight: 700; font-size: 1.1rem; color: var(--nexus-gray-900); }
.nexus-price--old { font-size: 0.875rem; color: var(--nexus-gray-400); text-decoration: line-through; font-weight: 400; }
.nexus-price--sale { color: var(--nexus-secondary); }

.nexus-stars { color: #f59e0b; font-size: 0.875rem; }

/* ---- Breaking News Ticker ---- */
.nexus-ticker {
  background: var(--nexus-primary);
  color: white;
  padding: 0.625rem 0;
  font-family: var(--nexus-font-ui);
  font-size: 0.875rem;
  overflow: hidden;
}

.nexus-ticker__inner { display: flex; align-items: center; gap: var(--nexus-spacing-lg); }
.nexus-ticker__label { background: var(--nexus-secondary); padding: 0.2rem 0.875rem; border-radius: var(--nexus-radius-full); font-weight: 700; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; white-space: nowrap; flex-shrink: 0; }

.nexus-ticker__track { overflow: hidden; flex: 1; }
.nexus-ticker__items { display: flex; gap: var(--nexus-spacing-2xl); animation: ticker-scroll 30s linear infinite; white-space: nowrap; }
.nexus-ticker__items a { color: rgba(255,255,255,0.9); }
.nexus-ticker__items a:hover { color: white; text-decoration: underline; }

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Footer ---- */
#colophon {
  background: var(--nexus-gray-900);
  color: var(--nexus-gray-400);
}

.footer-widgets {
  padding: var(--nexus-spacing-4xl) 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--nexus-spacing-2xl);
}

.footer-widget-area .widget-title {
  color: var(--nexus-white);
  border-color: var(--nexus-primary);
  font-size: 0.875rem;
}

.footer-widget-area a { color: var(--nexus-gray-400); transition: color var(--nexus-transition); }
.footer-widget-area a:hover { color: var(--nexus-white); }
.footer-widget-area p { color: var(--nexus-gray-400); font-size: 0.9rem; }

.footer-logo { margin-bottom: var(--nexus-spacing-lg); }
.footer-logo .site-title { color: white; font-size: 1.5rem; }

.footer-widget-area ul li { padding: 0.375rem 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.footer-widget-area ul li:last-child { border-bottom: none; }
.footer-widget-area ul li a { font-size: 0.9rem; }

.footer-bottom {
  padding: var(--nexus-spacing-lg) 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--nexus-spacing-lg);
  font-size: 0.85rem;
}

.footer-bottom-links { display: flex; gap: var(--nexus-spacing-lg); }
.footer-bottom-links a { color: var(--nexus-gray-500); }
.footer-bottom-links a:hover { color: white; }

.footer-social { display: flex; gap: 0.75rem; }
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--nexus-gray-400);
  font-size: 0.875rem;
  transition: all var(--nexus-transition);
}

.footer-social a:hover { background: var(--nexus-primary); color: white; }

/* ---- Back to Top ---- */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--nexus-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--nexus-shadow-lg);
  opacity: 0;
  transform: translateY(12px);
  transition: all var(--nexus-transition);
  z-index: 999;
  font-size: 1rem;
}

#back-to-top.visible { opacity: 1; transform: translateY(0); }
#back-to-top:hover { background: var(--nexus-primary-dark); transform: translateY(-2px); }

/* ---- Dark Mode Support ---- */
@media (prefers-color-scheme: dark) {
  :root {
    --nexus-white: #0d1117;
    --nexus-gray-100: #161b22;
    --nexus-gray-200: #21262d;
    --nexus-gray-300: #30363d;
    --nexus-gray-400: #484f58;
    --nexus-gray-500: #6e7681;
    --nexus-gray-600: #8b949e;
    --nexus-gray-700: #b1bac4;
    --nexus-gray-800: #c9d1d9;
    --nexus-gray-900: #e6edf3;
    --nexus-dark: #010409;
  }
  #masthead { background: rgba(13,17,23,0.95); border-color: #21262d; }
  .nexus-card { background: #161b22; }
  .comment { background: #161b22; }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .nexus-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .footer-widgets { grid-template-columns: repeat(2, 1fr); }
  .content-area.has-sidebar,
  .content-area.sidebar-left { grid-template-columns: 1fr; }
  .content-area.sidebar-left .primary { order: 1; }
  .content-area.sidebar-left #secondary { order: 2; }
}

@media (max-width: 768px) {
  :root { --nexus-header-height: 64px; }
  .nexus-container { padding: 0 var(--nexus-spacing-lg); }
  #primary-navigation { display: none; position: fixed; top: var(--nexus-header-height); left: 0; right: 0; bottom: 0; background: var(--nexus-white); padding: var(--nexus-spacing-lg); overflow-y: auto; border-top: 1px solid var(--nexus-gray-200); }
  #primary-navigation.open { display: block; }
  .primary-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .primary-menu > li > a { padding: 0.875rem 0; border-radius: 0; border-bottom: 1px solid var(--nexus-gray-100); }
  .primary-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; background: var(--nexus-gray-100); border-radius: var(--nexus-radius-md); margin-top: 0.5rem; }
  .menu-toggle { display: flex; }
  .nexus-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .nexus-grid--2 { grid-template-columns: 1fr; }
  .nexus-grid--1-2, .nexus-grid--2-1 { grid-template-columns: 1fr; }
  .nexus-section-header { flex-direction: column; align-items: flex-start; }
  .nexus-post-item { grid-template-columns: 1fr; }
  .footer-widgets { grid-template-columns: 1fr; gap: var(--nexus-spacing-xl); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .comment-form .form-row { grid-template-columns: 1fr; }
  .nexus-author-box { flex-direction: column; }
}

@media (max-width: 480px) {
  .nexus-grid--3, .nexus-grid--4 { grid-template-columns: 1fr; }
}
