/*
Theme Name: CodeScriptum Blog
Theme URI: https://codescriptum.pl
Author: CodeScriptum
Author URI: https://codescriptum.pl
Description: Nowoczesny motyw blogowy o AI i automatyzacji procesów biznesowych. Zaprojektowany by generować ruch i konwertować na usługi CodeScriptum.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: flavor flavor codescriptum-blog
Tags: blog, dark, modern, ai, automation, one-column, two-columns, custom-menu, featured-images, threaded-comments
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design System from Landing Page)
   ========================================================================== */

:root {
  /* Primary Palette */
  --primary: #7C3AED;
  --primary-light: #A78BFA;
  --primary-dark: #5B21B6;
  --secondary: #06B6D4;
  --accent: #F59E0B;
  --neon-blue: #3B82F6;
  --neon-pink: #EC4899;

  /* Dark Palette */
  --dark-900: #030712;
  --dark-800: #0F172A;
  --dark-700: #1E293B;
  --dark-600: #334155;

  /* Light Palette */
  --light-100: #F8FAFC;
  --light-200: #F1F5F9;
  --light-300: #E2E8F0;
  --white: #FFFFFF;

  /* Text */
  --text: #1E293B;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --text-on-dark: #E2E8F0;

  /* Gradients */
  --grad-hero: linear-gradient(135deg, #030712 0%, #0C0A20 40%, #0A1628 100%);
  --grad-primary: linear-gradient(135deg, #7C3AED 0%, #3B82F6 50%, #06B6D4 100%);
  --grad-glow: linear-gradient(135deg, #7C3AED 0%, #EC4899 100%);
  --grad-card: linear-gradient(135deg, rgba(124,58,237,0.08) 0%, rgba(6,182,212,0.05) 100%);
  --grad-dark-sec: linear-gradient(180deg, #0F172A 0%, #030712 100%);
  --grad-cta: linear-gradient(135deg, #7C3AED 0%, #3B82F6 50%, #06B6D4 100%);

  /* Sizing */
  --max-w: 1200px;
  --max-w-narrow: 800px;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* Transitions */
  --ease: 0.35s cubic-bezier(0.4, 0, 0.2, 1);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-card-hover: 0 12px 40px rgba(124,58,237,0.15);
  --shadow-dark-card: 0 4px 24px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 30px rgba(124,58,237,0.3);

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  /* Spacing */
  --header-h: 72px;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--light-100);
  overflow-x: hidden;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--primary-light);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1.25em;
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: 1.25em;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--max-w-narrow);
}

.gradient-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.section {
  padding: 80px 0;
  position: relative;
}

.section--dark {
  background: var(--grad-dark-sec);
  color: var(--text-on-dark);
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--white);
}

.section__title {
  text-align: center;
  margin-bottom: 12px;
}

.section__subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 48px;
}

.section--dark .section__subtitle {
  color: var(--text-light);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all var(--ease);
  text-decoration: none;
  line-height: 1.4;
  white-space: nowrap;
}

.btn--primary {
  background: var(--grad-primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(124,58,237,0.3);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(124,58,237,0.45);
  color: var(--white);
}

.btn--glow {
  position: relative;
}

.btn--glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: var(--grad-primary);
  border-radius: calc(var(--radius-sm) + 2px);
  z-index: -1;
  opacity: 0;
  filter: blur(12px);
  transition: opacity var(--ease);
}

.btn--glow:hover::after {
  opacity: 0.6;
}

.btn--ghost {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn--ghost:hover {
  background: rgba(124,58,237,0.08);
  color: var(--primary);
  transform: translateY(-2px);
}

.btn--white {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}

.btn--white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255,255,255,0.2);
  color: var(--primary);
}

.btn--sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn--full {
  width: 100%;
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(3,7,18,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: all var(--ease);
  height: var(--header-h);
}

.header.scrolled {
  background: rgba(3,7,18,0.92);
  box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.nav__logo img {
  height: 36px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
}

.nav__logo-text span {
  color: var(--primary-light);
}

.nav__menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav__link {
  color: var(--text-light);
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  transition: all var(--ease);
}

.nav__link:hover,
.nav__link.active {
  color: var(--white);
  background: rgba(255,255,255,0.06);
}

.nav__link--cta {
  background: var(--grad-primary);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.nav__link--cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(124,58,237,0.4);
}

/* Mobile Toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.nav__toggle-bar {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--ease);
}

.nav__toggle.active .nav__toggle-bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active .nav__toggle-bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ==========================================================================
   NAV DROPDOWN (Kategorie)
   ========================================================================== */

.nav__dropdown {
  position: relative;
}

.nav__dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav__dropdown-icon {
  font-size: 0.65rem;
  transition: transform var(--ease);
}

.nav__dropdown-toggle[aria-expanded="true"] .nav__dropdown-icon {
  transform: rotate(180deg);
}

/* Desktop dropdown */
.nav__dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-sm);
  padding: 8px 0;
  padding-top: 12px;
  margin-top: 0;
  list-style: none;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateX(-50%) translateY(4px);
}

.nav__dropdown-menu.open {
  display: block;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Desktop: hover to open */
@media (min-width: 769px) {
  .nav__dropdown:hover .nav__dropdown-menu,
  .nav__dropdown-toggle:focus + .nav__dropdown-menu {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .nav__dropdown:hover .nav__dropdown-icon {
    transform: rotate(180deg);
  }
}

.nav__dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  color: var(--text-light);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--ease);
  text-decoration: none;
  white-space: nowrap;
}

.nav__dropdown-item:hover,
.nav__dropdown-item.active {
  color: var(--white);
  background: rgba(124,58,237,0.15);
}

.nav__dropdown-count {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.08);
  color: var(--text-light);
  padding: 2px 8px;
  border-radius: 50px;
  font-weight: 600;
}

.nav__dropdown-item:hover .nav__dropdown-count,
.nav__dropdown-item.active .nav__dropdown-count {
  background: rgba(124,58,237,0.3);
  color: var(--primary-light);
}

/* ==========================================================================
   BLOG HERO
   ========================================================================== */

.blog-hero {
  position: relative;
  background: var(--grad-hero);
  padding: 140px 0 80px;
  overflow: hidden;
  text-align: center;
}

.blog-hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(124,58,237,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(59,130,246,0.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 50% 80%, rgba(6,182,212,0.08) 0%, transparent 70%);
  animation: meshFloat 12s ease-in-out infinite;
}

@keyframes meshFloat {
  0%, 100% { transform: scale(1) rotate(0deg); }
  33% { transform: scale(1.05) rotate(1deg); }
  66% { transform: scale(0.98) rotate(-1deg); }
}

.blog-hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: orbFloat 8s ease-in-out infinite;
}

.blog-hero__orb--1 {
  width: 300px;
  height: 300px;
  background: var(--primary);
  top: -50px;
  left: 10%;
  animation-delay: 0s;
}

.blog-hero__orb--2 {
  width: 250px;
  height: 250px;
  background: var(--neon-blue);
  top: 30%;
  right: 5%;
  animation-delay: -3s;
}

.blog-hero__orb--3 {
  width: 200px;
  height: 200px;
  background: var(--secondary);
  bottom: -30px;
  left: 40%;
  animation-delay: -6s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(20px, -30px); }
  50% { transform: translate(-10px, 20px); }
  75% { transform: translate(15px, 10px); }
}

.blog-hero__content {
  position: relative;
  z-index: 2;
}

.blog-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 50px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--primary-light);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 24px;
}

.blog-hero__badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--secondary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.blog-hero__title {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 16px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.blog-hero__subtitle {
  color: var(--text-light);
  font-size: 1.125rem;
  max-width: 550px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.blog-hero__search {
  max-width: 500px;
  margin: 0 auto;
  position: relative;
}

.blog-hero__search input {
  width: 100%;
  padding: 16px 54px 16px 24px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
  backdrop-filter: blur(10px);
  transition: all var(--ease);
}

.blog-hero__search input::placeholder {
  color: var(--text-light);
}

.blog-hero__search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.blog-hero__search button {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--grad-primary);
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--ease);
}

.blog-hero__search button:hover {
  transform: translateY(-50%) scale(1.05);
}

/* Category pills in hero */
.blog-hero__categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 32px;
}

.blog-hero__cat-pill {
  padding: 6px 18px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.04);
  color: var(--text-light);
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all var(--ease);
  text-decoration: none;
}

.blog-hero__cat-pill:hover,
.blog-hero__cat-pill.active {
  background: rgba(124,58,237,0.2);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* ==========================================================================
   POST CARDS (Blog Listing)
   ========================================================================== */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--light-300);
  transition: all var(--ease);
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(124,58,237,0.2);
}

.post-card__image {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease);
}

.post-card:hover .post-card__image img {
  transform: scale(1.04);
}

.post-card__image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--grad-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.post-card__image-placeholder i {
  font-size: 3rem;
  color: var(--primary-light);
  opacity: 0.4;
}

.post-card__category {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 4px 14px;
  border-radius: 50px;
  background: rgba(124,58,237,0.9);
  backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-decoration: none;
  transition: all var(--ease);
}

.post-card__category:hover {
  background: var(--primary);
  color: var(--white);
}

.post-card__body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.post-card__meta i {
  margin-right: 4px;
  font-size: 0.75rem;
}

.post-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.post-card__title a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--ease);
}

.post-card__title a:hover {
  color: var(--primary);
}

.post-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 20px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--light-300);
}

.post-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8125rem;
}

.post-card__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.75rem;
}

.post-card__avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.post-card__read-more {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--ease);
}

.post-card__read-more:hover {
  gap: 10px;
  color: var(--primary-light);
}

/* Featured Post (Full Width) */
.post-card--featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.post-card--featured .post-card__image {
  aspect-ratio: auto;
  min-height: 320px;
}

.post-card--featured .post-card__body {
  padding: 32px;
  justify-content: center;
}

.post-card--featured .post-card__title {
  font-size: 1.5rem;
}

.post-card--featured .post-card__excerpt {
  -webkit-line-clamp: 4;
}

/* ==========================================================================
   BLOG LAYOUT (Content + Sidebar)
   ========================================================================== */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  align-items: start;
}

.blog-content {
  min-width: 0;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

.sidebar__widget {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--light-300);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar__widget-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--light-300);
  position: relative;
}

.sidebar__widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--grad-primary);
}

/* Sidebar Search */
.sidebar__search {
  position: relative;
}

.sidebar__search input {
  width: 100%;
  padding: 12px 44px 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--light-300);
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--light-100);
  transition: all var(--ease);
}

.sidebar__search input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.sidebar__search button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

/* Sidebar Popular Posts */
.sidebar__popular-item {
  display: flex;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--light-200);
}

.sidebar__popular-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.sidebar__popular-item:first-child {
  padding-top: 0;
}

.sidebar__popular-thumb {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar__popular-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar__popular-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.sidebar__popular-title a {
  color: var(--text);
}

.sidebar__popular-title a:hover {
  color: var(--primary);
}

.sidebar__popular-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Sidebar Categories */
.sidebar__categories {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar__categories li {
  padding: 0;
}

.sidebar__categories a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--light-200);
  color: var(--text);
  font-size: 0.9375rem;
  transition: all var(--ease);
}

.sidebar__categories a:hover {
  color: var(--primary);
  padding-left: 8px;
}

.sidebar__categories .count {
  background: var(--light-200);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Sidebar Tags */
.sidebar__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar__tag {
  padding: 5px 14px;
  border-radius: 50px;
  border: 1px solid var(--light-300);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--ease);
}

.sidebar__tag:hover {
  background: rgba(124,58,237,0.08);
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   SIDEBAR CTA (Sticky)
   ========================================================================== */

.sidebar-cta {
  background: var(--grad-dark-sec);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  border: 1px solid rgba(124,58,237,0.2);
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}

.sidebar-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(124,58,237,0.1) 0%, transparent 60%);
  pointer-events: none;
}

.sidebar-cta__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(124,58,237,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.5rem;
  color: var(--primary-light);
  position: relative;
}

.sidebar-cta__title {
  font-size: 1.125rem;
  color: var(--white);
  margin-bottom: 10px;
  position: relative;
}

.sidebar-cta__desc {
  color: var(--text-light);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 20px;
  position: relative;
}

.sidebar-cta .btn {
  position: relative;
  width: 100%;
}

/* ==========================================================================
   CTA INLINE (Inside Post Content)
   ========================================================================== */

.cta-inline {
  background: var(--grad-hero);
  border-radius: var(--radius);
  padding: 40px;
  margin: 40px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,0.2);
}

.cta-inline::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 40% 50% at 20% 50%, rgba(124,58,237,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 30% 40% at 80% 30%, rgba(59,130,246,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inline__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(124,58,237,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 1.75rem;
  color: var(--primary-light);
  position: relative;
}

.cta-inline__title {
  font-size: 1.375rem;
  color: var(--white);
  margin-bottom: 10px;
  position: relative;
}

.cta-inline__desc {
  color: var(--text-light);
  font-size: 0.9375rem;
  max-width: 450px;
  margin: 0 auto 24px;
  line-height: 1.6;
  position: relative;
}

.cta-inline .btn {
  position: relative;
  outline: none;
  text-decoration: none;
  color: white;
}

/* ==========================================================================
   CTA BETWEEN POSTS (Listing)
   ========================================================================== */

.cta-between {
  grid-column: 1 / -1;
  background: var(--grad-hero);
  border-radius: var(--radius);
  padding: 60px 48px;
  display: flex;
  align-items: center;
  gap: 48px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(124,58,237,0.15);
}

.cta-between::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 50% at 0% 50%, rgba(124,58,237,0.15) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 100% 50%, rgba(6,182,212,0.1) 0%, transparent 70%);
  pointer-events: none;
}

.cta-between__content {
  flex: 1;
  position: relative;
}

.cta-between__title {
  font-size: 1.5rem;
  color: var(--white);
  margin-bottom: 12px;
}

.cta-between__desc {
  color: var(--text-light);
  font-size: 1rem;
  margin-bottom: 0;
}

.cta-between__features {
  display: flex;
  gap: 24px;
  margin-top: 16px;
  list-style: none;
  padding: 0;
}

.cta-between__features li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-on-dark);
  font-size: 0.875rem;
}

.cta-between__features i {
  color: var(--secondary);
}

.cta-between__action {
  flex-shrink: 0;
  position: relative;
}

/* ==========================================================================
   CTA FLOATING BOTTOM BAR
   ========================================================================== */

.cta-floating {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: rgba(3,7,18,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(124,58,237,0.2);
  padding: 12px 0;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-floating.visible {
  transform: translateY(0);
}

.cta-floating__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.cta-floating__text {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-on-dark);
  font-size: 0.9375rem;
}

.cta-floating__text i {
  font-size: 1.25rem;
  color: var(--primary-light);
}

.cta-floating__text strong {
  color: var(--white);
}

.cta-floating__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cta-floating__close {
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 8px;
  font-size: 1.125rem;
  transition: color var(--ease);
}

.cta-floating__close:hover {
  color: var(--white);
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */

/* Single Hero */
.single-hero {
  background: var(--grad-hero);
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.single-hero__mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 20% 50%, rgba(124,58,237,0.12) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(59,130,246,0.08) 0%, transparent 70%);
}

.single-hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.single-hero__breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-light);
  margin-bottom: 24px;
}

.single-hero__breadcrumb a {
  color: var(--text-light);
  transition: color var(--ease);
}

.single-hero__breadcrumb a:hover {
  color: var(--primary-light);
}

.single-hero__breadcrumb .separator {
  color: var(--text-light);
  opacity: 0.4;
}

.single-hero__category {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 50px;
  background: rgba(124,58,237,0.2);
  color: var(--primary-light);
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 16px;
  text-decoration: none;
  transition: all var(--ease);
}

.single-hero__category:hover {
  background: rgba(124,58,237,0.35);
  color: var(--primary-light);
}

.single-hero__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.single-hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  color: var(--text-light);
  font-size: 0.875rem;
}

.single-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.single-hero__meta-item i {
  font-size: 0.8125rem;
  color: var(--primary-light);
}

/* Post Content */
.post-content {
  padding: 48px 0;
}

.post-content__body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text);
}

.post-content__body h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
  padding-top: 16px;
}

.post-content__body h3 {
  font-size: 1.25rem;
  margin: 32px 0 12px;
}

.post-content__body p {
  margin-bottom: 1.5em;
}

.post-content__body a {
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: rgba(124,58,237,0.3);
  text-underline-offset: 3px;
  transition: all var(--ease);
}

.post-content__body a:hover {
  text-decoration-color: var(--primary);
}

.post-content__body blockquote {
  border-left: 4px solid var(--primary);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--grad-card);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-muted);
}

.post-content__body blockquote p:last-child {
  margin-bottom: 0;
}

.post-content__body pre {
  background: var(--dark-800);
  color: var(--text-on-dark);
  padding: 24px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.post-content__body code {
  background: rgba(124,58,237,0.08);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.875em;
}

.post-content__body pre code {
  background: none;
  color: inherit;
  padding: 0;
}

.post-content__body img {
  border-radius: var(--radius-sm);
  margin: 24px 0;
}

.post-content__body ul,
.post-content__body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.post-content__body li {
  margin-bottom: 0.5em;
}

.post-content__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.post-content__body th {
  background: var(--dark-800);
  color: var(--white);
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
}

.post-content__body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--light-300);
}

.post-content__body tr:last-child td {
  border-bottom: none;
}

/* Table of Contents */
.toc {
  background: var(--light-100);
  border: 1px solid var(--light-300);
  border-radius: var(--radius-sm);
  padding: 24px;
  margin-bottom: 32px;
}

.toc__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toc__title i {
  color: var(--primary);
}

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

.toc__list li {
  margin-bottom: 0;
}

.toc__list a {
  display: block;
  padding: 6px 0;
  color: var(--text-muted);
  font-size: 0.875rem;
  border-bottom: 1px solid var(--light-200);
  transition: all var(--ease);
}

.toc__list a:hover {
  color: var(--primary);
  padding-left: 8px;
}

.toc__list .toc__h3 {
  padding-left: 16px;
}

/* Post Tags */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 40px 0;
  padding-top: 24px;
  border-top: 1px solid var(--light-300);
}

.post-tags__label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 8px;
}

.post-tags a {
  padding: 4px 14px;
  border-radius: 50px;
  border: 1px solid var(--light-300);
  font-size: 0.8125rem;
  color: var(--text-muted);
  transition: all var(--ease);
}

.post-tags a:hover {
  background: rgba(124,58,237,0.08);
  border-color: var(--primary);
  color: var(--primary);
}

/* Author Box */
.author-box {
  background: var(--light-100);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  gap: 24px;
  margin: 40px 0;
  border: 1px solid var(--light-300);
}

.author-box__avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.author-box__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-box__avatar-placeholder {
  width: 100%;
  height: 100%;
  background: var(--grad-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 2rem;
}

.author-box__name {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.author-box__role {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 8px;
}

.author-box__bio {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Related Posts */
.related-posts {
  padding: 60px 0;
  background: var(--light-100);
  border-top: 1px solid var(--light-300);
}

.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Post Navigation (Prev/Next) */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 40px 0;
}

.post-nav-link {
  background: var(--light-100);
  border-radius: var(--radius-sm);
  padding: 20px;
  border: 1px solid var(--light-300);
  transition: all var(--ease);
}

.post-nav-link:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card);
}

.post-nav-link__label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.post-nav-link__title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
}

.post-nav-link--next {
  text-align: right;
}

.post-nav-link--next .post-nav-link__label {
  justify-content: flex-end;
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

.comments-section {
  margin: 40px 0;
}

.comments-section__title {
  font-size: 1.25rem;
  margin-bottom: 24px;
}

.comment {
  display: flex;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid var(--light-200);
}

.comment__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

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

.comment__body {
  flex: 1;
}

.comment__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.comment__author {
  font-weight: 600;
  font-size: 0.9375rem;
}

.comment__date {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.comment__text {
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.comment__reply-link {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
  margin-top: 8px;
  display: inline-block;
}

/* Comment Reply (nested) */
.comment--reply {
  margin-left: 48px;
}

/* Comment Form */
.comment-form {
  margin-top: 32px;
}

.comment-form__title {
  font-size: 1.125rem;
  margin-bottom: 20px;
}

.comment-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.comment-form__group {
  display: flex;
  flex-direction: column;
}

.comment-form__group label {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}

.comment-form__group input,
.comment-form__group textarea {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--light-300);
  font-family: var(--font);
  font-size: 0.9375rem;
  background: var(--white);
  transition: all var(--ease);
}

.comment-form__group input:focus,
.comment-form__group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.1);
}

.comment-form__group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  transition: all var(--ease);
  border: 1px solid var(--light-300);
  color: var(--text);
  background: var(--white);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(124,58,237,0.05);
}

.pagination .current {
  background: var(--grad-primary);
  color: var(--white);
  border-color: transparent;
}

.pagination .dots {
  border: none;
  background: none;
  color: var(--text-muted);
}

.pagination .prev,
.pagination .next {
  gap: 6px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--dark-900);
  color: var(--text-light);
  padding: 60px 0 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.5fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.footer__brand img {
  height: 32px;
}

.footer__brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
}

.footer__brand-name span {
  color: var(--primary-light);
}

.footer__desc {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 20px;
}

.footer__social {
  display: flex;
  gap: 12px;
}

.footer__social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: all var(--ease);
}

.footer__social a:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.footer__heading {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}

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

.footer__links li {
  margin-bottom: 10px;
}

.footer__links a {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: all var(--ease);
}

.footer__links a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

/* Footer Newsletter */
.footer__newsletter-text {
  font-size: 0.875rem;
  color: var(--text-light);
  margin-bottom: 16px;
}

.footer__newsletter-form {
  display: flex;
  gap: 8px;
}

.footer__newsletter-form input {
  flex: 1;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: var(--white);
  font-family: var(--font);
  font-size: 0.875rem;
}

.footer__newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

.footer__newsletter-form button {
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  background: var(--grad-primary);
  color: var(--white);
  border: none;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
}

.footer__newsletter-form button:hover {
  box-shadow: 0 4px 15px rgba(124,58,237,0.4);
}

.footer__bottom {
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--text-light);
}

.footer__bottom a {
  color: var(--text-light);
}

.footer__bottom a:hover {
  color: var(--primary-light);
}

/* ==========================================================================
   SEARCH RESULTS
   ========================================================================== */

.search-results__query {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.search-results__query strong {
  color: var(--primary);
}

/* ==========================================================================
   404 PAGE
   ========================================================================== */

.error-404 {
  text-align: center;
  padding: 80px 24px;
}

.error-404__number {
  font-size: clamp(6rem, 15vw, 10rem);
  font-family: var(--font-display);
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
}

.error-404__title {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.error-404__desc {
  color: var(--text-muted);
  max-width: 400px;
  margin: 0 auto 32px;
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-animate].animated {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   NEWSLETTER SECTION (Between posts CTA variant)
   ========================================================================== */

.newsletter-section {
  background: var(--grad-dark-sec);
  padding: 60px 0;
  text-align: center;
}

.newsletter-section__title {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.newsletter-section__desc {
  color: var(--text-light);
  margin-bottom: 24px;
}

.newsletter-form {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: var(--font);
  font-size: 1rem;
}

.newsletter-form input:focus {
  outline: none;
  border-color: var(--primary);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 1024px) {
  .blog-layout {
    grid-template-columns: 1fr 280px;
    gap: 32px;
  }

  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-h: 64px;
  }

  .section {
    padding: 60px 0;
  }

  /* Mobile Nav */
  .nav__toggle {
    display: flex;
  }

  .nav__menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: var(--dark-900);
    flex-direction: column;
    padding: 100px 32px 32px;
    gap: 10px;
    transition: right var(--ease);
    border-left: 1px solid rgba(255,255,255,0.06);
  }

  .nav__menu.open {
    right: 0;
  }

  .nav__link {
    width: 100%;
    padding: 12px 16px;
  }

  .nav__link--cta {
    margin-top: 16px;
    text-align: center;
  }

  /* Mobile dropdown */
  .nav__dropdown {
    width: 100%;
  }

  .nav__dropdown-toggle {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .nav__dropdown-menu {
    position: static;
    transform: none;
    min-width: 100%;
    background: rgba(255,255,255,0.04);
    border: none;
    border-radius: var(--radius-xs);
    margin-top: 4px;
    padding: 4px 0;
    box-shadow: none;
    backdrop-filter: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
    display: block;
  }

  .nav__dropdown-menu.open {
    max-height: 500px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .nav__dropdown-item {
    padding: 10px 24px;
    justify-content: center;
    gap: 10px;
  }

  .nav__ctaBtn 
  {
    margin-top:14px;
  }

  /* Blog Layout */
  .blog-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  /* Posts Grid */
  .posts-grid {
    grid-template-columns: 1fr;
  }

  .post-card--featured {
    grid-template-columns: 1fr;
  }

  .post-card--featured .post-card__image {
    min-height: 200px;
    aspect-ratio: 16/9;
  }

  /* CTA Between */
  .cta-between {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px;
  }

  .cta-between__features {
    justify-content: center;
    flex-wrap: wrap;
  }

  /* Related Posts */
  .related-posts__grid {
    grid-template-columns: 1fr;
  }

  /* Post Navigation */
  .post-navigation {
    grid-template-columns: 1fr;
  }

  /* Footer */
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  /* Author Box */
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  /* Floating CTA */
  .cta-floating__text span:not(strong):not(i) {
    display: none;
  }

  /* Comment Form */
  .comment-form__row {
    grid-template-columns: 1fr;
  }

  .comment--reply {
    margin-left: 24px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .blog-hero {
    padding: 120px 0 60px;
  }

  .blog-hero__title {
    font-size: 1.75rem;
  }

  .blog-hero__categories {
    gap: 8px;
  }

  .blog-hero__cat-pill {
    font-size: 0.75rem;
    padding: 5px 14px;
  }

  .cta-inline {
    padding: 28px 20px;
  }

  .post-card__body {
    padding: 16px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer__newsletter-form {
    flex-direction: column;
  }

  /* Cookie Banner Mobile */
  .cookie-banner__inner {
    flex-direction: column;
    padding: 1rem;
  }

  .cookie-banner__actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-banner__btn {
    flex: 1;
    justify-content: center;
    padding: 0.5rem 0.8rem;
    font-size: 0.78rem;
  }

  .cookie-modal__panel {
    width: 95%;
    max-height: 90vh;
  }

  .cookie-modal__footer {
    flex-direction: column;
  }

  .cookie-modal__footer .cookie-banner__btn {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9998;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-banner__inner {
  max-width: var(--max-w, 1200px);
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  background: rgba(3, 7, 18, 0.97);
  backdrop-filter: blur(20px);
  border-top: 1px solid rgba(124, 58, 237, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner__text {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex: 1;
  min-width: 280px;
}

.cookie-banner__text strong {
  display: block;
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.cookie-banner__text p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin: 0;
}

.cookie-banner__icon {
  font-size: 1.5rem;
  color: var(--accent, #F59E0B);
  flex-shrink: 0;
  margin-top: 2px;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.cookie-banner__btn {
  padding: 0.6rem 1.2rem;
  border: none;
  border-radius: 50px;
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.cookie-banner__btn--accept {
  background: var(--grad-primary);
  color: var(--white);
  box-shadow: 0 0 15px rgba(124, 58, 237, 0.3);
}

.cookie-banner__btn--accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(124, 58, 237, 0.5);
}

.cookie-banner__btn--reject {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner__btn--reject:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
}

.cookie-banner__btn--settings {
  background: transparent;
  color: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cookie-banner__btn--settings:hover {
  color: rgba(255, 255, 255, 0.8);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   COOKIE SETTINGS MODAL
   ========================================================================== */

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.cookie-modal.visible {
  opacity: 1;
  pointer-events: auto;
}

.cookie-modal.visible .cookie-modal__panel {
  transform: translateY(0) scale(1);
}

.cookie-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.cookie-modal__panel {
  position: relative;
  width: 90%;
  max-width: 540px;
  max-height: 85vh;
  background: var(--dark-800);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5),
              0 0 50px rgba(124, 58, 237, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.cookie-modal__header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
}

.cookie-modal__header h3 i {
  color: var(--primary-light);
}

.cookie-modal__close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  transition: color var(--ease);
}

.cookie-modal__close:hover {
  color: var(--white);
}

.cookie-modal__body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.cookie-modal__intro {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.cookie-modal__intro strong {
  color: rgba(255, 255, 255, 0.75);
}

.cookie-modal__intro a {
  color: var(--primary-light);
  text-decoration: underline;
}

.cookie-modal__intro a:hover {
  color: var(--white);
}

.cookie-modal__category {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.cookie-modal__category p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin-top: 0.6rem;
  margin-bottom: 0;
}

.cookie-modal__cat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cookie-modal__cat-header strong {
  display: block;
  font-size: 0.92rem;
  color: var(--white);
}

.cookie-modal__cat-header span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
}

.cookie-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Cookie Toggle Switch */
.cookie-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  cursor: pointer;
  transition: all var(--ease);
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: var(--white);
  border-radius: 50%;
  transition: transform var(--ease);
}

.cookie-toggle input:checked + .cookie-toggle__slider {
  background: var(--primary);
}

.cookie-toggle input:checked + .cookie-toggle__slider::before {
  transform: translateX(20px);
}

.cookie-toggle--locked {
  opacity: 0.5;
}

.cookie-toggle--locked .cookie-toggle__slider {
  cursor: not-allowed;
  background: rgba(124, 58, 237, 0.5);
}
