/*
Theme Name: EatMove Blog
Theme URI: https://trener-krakow.pl
Author: EatMove
Author URI: https://trener-krakow.pl
Description: Lekki motyw blogowy EatMove — dark theme dopasowany do strony głównej. Zoptymalizowany pod PageSpeed.
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: eatmove
Requires at least: 6.0
Requires PHP: 8.0
*/

/* ============================================
   EATMOVE BLOG — Design System
   Matches Astro main site 1:1
   ============================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --color-bg: #07070a;
  --color-bg-elevated: #0f0f14;
  --color-surface: #111116;
  --color-border: rgba(255, 255, 255, 0.06);
  --color-border-light: rgba(255, 255, 255, 0.1);
  --color-text: #f4f4f5;
  --color-text-secondary: #a1a1aa;
  --color-text-muted: #52525b;
  --color-accent: #c8a84e;
  --color-accent-hover: #dbbf5e;
  --color-accent-light: rgba(200, 168, 78, 0.1);
  --color-success: #22c55e;
  --color-error: #ef4444;

  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.3125rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;

  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  --max-width: 1200px;
  --max-width-narrow: 800px;
  --header-height: 72px;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 20px rgba(200, 168, 78, 0.15), 0 0 60px rgba(200, 168, 78, 0.05);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);

  --glass-bg: rgba(255, 255, 255, 0.03);
  --glass-border: rgba(255, 255, 255, 0.06);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
  min-height: 100dvh;
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

::selection {
  background: rgba(200, 168, 78, 0.3);
  color: #fff;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(7, 7, 10, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.header__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--space-xl);
}

.header__logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-text);
}

.header__logo-accent {
  background: linear-gradient(135deg, var(--color-accent), #e8d08e);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__links {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
}

.header__link {
  padding: 0.5rem 0.875rem;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background var(--transition-fast);
}

.header__link:hover,
.header__link--active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.05);
}

.header__link--active {
  color: var(--color-accent);
}

.header__cta {
  display: inline-flex;
  align-items: center;
  padding: 0.625rem 1.25rem;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-accent) 0%, #b8963e 100%);
  color: #0a0a0a;
  border: 1px solid rgba(200, 168, 78, 0.5);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.header__cta:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

/* Desktop: hide mobile-only elements */
.header__mobile-cta {
  display: none;
}

.header__mobile-langs {
  display: none;
}

/* Mobile burger */
.header__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 8px;
  position: relative;
  z-index: 1001;
  transition: all var(--transition-fast);
}

.header__burger:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--color-border);
}

.header__burger-line {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.77, 0, 0.175, 1);
  transform-origin: center;
}

.header__burger-line + .header__burger-line {
  margin-top: 5px;
}

/* ---------- Section ---------- */
.section {
  padding-block: var(--space-4xl);
  position: relative;
}

.section-label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
  padding: 0.3rem 0.9rem;
  background: var(--color-accent-light);
  border: 1px solid rgba(200, 168, 78, 0.15);
  border-radius: var(--radius-full);
}

.section-title {
  font-size: clamp(2.2rem, 5vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-md);
  line-height: 1.1;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 600px;
  line-height: 1.65;
}

.accent {
  background: linear-gradient(135deg, var(--color-accent), #e8c95a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---------- Blog Hero ---------- */
section.blog-hero {
  padding-block-start: calc(var(--header-height) + var(--space-3xl));
  padding-block-end: var(--space-2xl);
  text-align: center;
}

/* ---------- Blog Grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-xl);
}

/* ---------- Blog Card ---------- */
.blog-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  position: relative;
}

.blog-card::before {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(200, 168, 78, 0.2), transparent 50%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.blog-card:hover::before { opacity: 1; }

.blog-card:hover {
  border-color: rgba(200, 168, 78, 0.15);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.blog-card__link {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card__image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.blog-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--color-text-muted);
  font-size: 2rem;
}

.blog-card__content {
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex: 1;
}

.blog-card__categories {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.blog-card__category {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  background: rgba(200, 168, 78, 0.08);
  border: 1px solid rgba(200, 168, 78, 0.15);
  border-radius: var(--radius-full);
}

.blog-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  line-height: 1.3;
  transition: color 0.2s ease;
}

.blog-card:hover .blog-card__title {
  color: var(--color-accent);
}

.blog-card__excerpt {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: auto;
  padding-top: var(--space-md);
  border-top: 1px solid var(--glass-border);
}

.blog-card__dot {
  color: rgba(200, 168, 78, 0.3);
}

/* ---------- Single Post ---------- */
.blog-post__header {
  padding-top: calc(var(--header-height) + var(--space-3xl));
  margin-bottom: var(--space-2xl);
}

.blog-post__back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  transition: color var(--transition-fast);
}

.blog-post__back:hover { color: var(--color-accent); }

.blog-post__back svg {
  width: 16px; height: 16px;
}

.blog-post__categories {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-md);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 1rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.03em;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, rgba(200, 168, 78, 0.15), rgba(200, 168, 78, 0.08));
  color: var(--color-accent);
  border: 1px solid rgba(200, 168, 78, 0.2);
}

.blog-post__title {
  font-size: clamp(2rem, 5vw, var(--text-4xl));
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.blog-post__meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.blog-post__dot { color: rgba(200, 168, 78, 0.3); }

.blog-post__featured-image {
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: var(--space-3xl);
  border: 1px solid var(--glass-border);
}

.blog-post__featured-image img {
  width: 100%; height: auto;
  display: block;
}

/* ---------- Prose (WP content) ---------- */
.prose {
  font-size: var(--text-base);
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
  color: var(--color-text);
  font-weight: 700;
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.75em;
}

.prose h2 { font-size: var(--text-2xl); }
.prose h3 { font-size: var(--text-xl); }
.prose h4 { font-size: var(--text-lg); }

.prose p { margin-bottom: 1.5em; }

.prose a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(200, 168, 78, 0.3);
  transition: text-decoration-color var(--transition-fast);
}

.prose a:hover { text-decoration-color: var(--color-accent); }

.prose strong { color: var(--color-text); font-weight: 600; }

.prose em { font-style: italic; }

.prose ul, .prose ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }

.prose li { color: var(--color-text-secondary); }
.prose li::marker { color: var(--color-accent); }

.prose blockquote {
  border-left: 3px solid var(--color-accent);
  padding: var(--space-md) var(--space-lg);
  background: rgba(200, 168, 78, 0.04);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-bottom: 1.5em;
  font-style: italic;
  color: var(--color-text);
}

.prose img {
  border-radius: var(--radius-lg);
  margin-block: 2em;
  border: 1px solid var(--glass-border);
}

.prose figure {
  margin-block: 2em;
}

.prose figcaption {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
}

.prose pre {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  overflow-x: auto;
  margin-bottom: 1.5em;
  font-size: var(--text-sm);
}

.prose code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.prose pre code {
  background: none;
  padding: 0;
}

/* ---------- WordPress Classic Editor: Alignment & Captions ---------- */
.alignleft {
  float: left;
  margin: 0 var(--space-lg) var(--space-lg) 0;
  max-width: 50%;
}
.alignright {
  float: right;
  margin: 0 0 var(--space-lg) var(--space-lg);
  max-width: 50%;
}
.aligncenter,
.prose .aligncenter,
.prose img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2em;
  float: none;
}
.alignnone {
  display: block;
  margin-bottom: var(--space-lg);
}

/* Clearfix after floated images */
.prose::after {
  content: '';
  display: table;
  clear: both;
}

/* WordPress size classes */
.size-auto,
.size-full {
  width: 100%;
  height: auto;
}
.size-large {
  max-width: 100%;
  height: auto;
}
.size-medium {
  max-width: 100%;
  height: auto;
}
.size-thumbnail {
  max-width: 150px;
  height: auto;
}

.wp-caption {
  max-width: 100%;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  margin-bottom: 1.5em;
}
.wp-caption.aligncenter {
  margin-left: auto;
  margin-right: auto;
}
.wp-caption img {
  border-radius: var(--radius-sm);
  display: block;
  width: 100%;
  height: auto;
}
.wp-caption-text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: var(--space-sm);
  padding: 0 var(--space-sm);
}

.prose hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-light), transparent);
  margin-block: 3em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5em;
  font-size: var(--text-sm);
}

.prose th, .prose td {
  padding: 0.75em 1em;
  border: 1px solid var(--color-border);
  text-align: left;
}

.prose th {
  background: var(--color-bg-elevated);
  font-weight: 600;
  color: var(--color-text);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-3xl);
}

.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
}

.pagination .current {
  background: linear-gradient(135deg, var(--color-accent), #b8963e);
  color: #0a0a0a;
  border-color: var(--color-accent);
  font-weight: 700;
}

.pagination .dots {
  border: none;
  color: var(--color-text-muted);
}

/* ---------- Post Navigation ---------- */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-top: var(--space-3xl);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border);
}

.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
  text-decoration: none;
}

.post-nav__link:hover {
  border-color: rgba(200, 168, 78, 0.2);
  background: var(--color-accent-light);
  transform: translateY(-2px);
}

.post-nav__link--next {
  text-align: right;
  grid-column: 2;
}

.post-nav__link--prev {
  grid-column: 1;
}

/* When only one link exists */
.post-nav__link--prev:only-child {
  grid-column: 1;
}
.post-nav__link--next:only-child {
  grid-column: 2;
}

.post-nav__label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-nav__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 600px) {
  .post-nav {
    grid-template-columns: 1fr;
  }
  .post-nav__link--next,
  .post-nav__link--prev,
  .post-nav__link--prev:only-child,
  .post-nav__link--next:only-child {
    grid-column: 1;
    text-align: left;
  }
}

/* ---------- Search Form ---------- */
.search-form {
  display: flex;
  gap: var(--space-sm);
  max-width: 400px;
}

.search-form .search-field {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color var(--transition-fast);
}

.search-form .search-field:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 168, 78, 0.15);
}

.search-form .search-field::placeholder {
  color: var(--color-text-muted);
}

.search-form .search-submit {
  padding: 0.625rem 1.25rem;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  color: #0a0a0a;
  background: linear-gradient(135deg, var(--color-accent), #b8963e);
  border: 1px solid rgba(200, 168, 78, 0.5);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-base);
}

.search-form .search-submit:hover {
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

/* ---------- Skip to Content (A11y) ---------- */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: var(--space-md);
  padding: var(--space-sm) var(--space-lg);
  background: var(--color-accent);
  color: #0a0a0a;
  font-weight: 700;
  font-size: var(--text-sm);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  z-index: 10000;
  transition: top var(--transition-fast);
}

.skip-to-content:focus {
  top: 0;
}

/* ---------- Focus States (A11y) ---------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* ---------- Buttons (matching Astro design system) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.875rem 2rem;
  font-weight: 600;
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #b8963e 100%);
  color: #0a0a0a;
  border: 1px solid rgba(200, 168, 78, 0.5);
}

.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
  color: #0a0a0a;
  text-decoration: none;
}

.btn--primary:active {
  transform: translateY(0);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border-light);
}

.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-light);
  text-decoration: none;
}

.btn--large {
  padding: 1.1rem 2.75rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
}

/* Blog CTA block — AAA+ premium look */
.blog-cta {
  position: relative;
  text-align: center;
  margin: var(--space-3xl) calc(-1 * var(--space-xl)) var(--space-2xl);
  padding: var(--space-2xl) var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  background: linear-gradient(135deg, rgba(200, 168, 78, 0.06) 0%, rgba(200, 168, 78, 0.02) 100%);
  border: 1px solid rgba(200, 168, 78, 0.12);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.blog-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200, 168, 78, 0.5), transparent);
}

.blog-cta .btn {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.625rem;
  width: fit-content;
  min-width: 280px;
  text-align: center;
  text-decoration: none !important;
  text-underline-offset: initial;
  padding: 1.05rem 2.75rem;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: nowrap;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(200, 168, 78, 0.25), 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-cta .btn.btn--primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, #b8963e 100%);
  color: #0a0a0a !important;
  border: 1px solid rgba(200, 168, 78, 0.6);
}

.blog-cta .btn.btn--secondary {
  background: transparent;
  color: var(--color-text) !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: none;
}

.blog-cta .btn:hover {
  transform: translateY(-3px);
  text-decoration: none !important;
}

.blog-cta .btn.btn--primary:hover {
  background: linear-gradient(135deg, var(--color-accent-hover) 0%, var(--color-accent) 100%);
  color: #0a0a0a !important;
  box-shadow: 0 8px 35px rgba(200, 168, 78, 0.35), 0 2px 8px rgba(0, 0, 0, 0.3);
}

.blog-cta .btn.btn--secondary:hover {
  border-color: var(--color-accent);
  color: var(--color-accent) !important;
  background: var(--color-accent-light);
  box-shadow: 0 4px 15px rgba(200, 168, 78, 0.1);
}

.blog-cta .btn:active {
  transform: translateY(-1px);
}

.blog-cta .btn svg {
  display: inline-block !important;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.blog-cta .btn:hover svg {
  transform: translateX(4px);
}

@media (max-width: 640px) {
  .blog-cta {
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
    padding: var(--space-xl) var(--space-md);
    border-radius: var(--radius-lg);
  }
  .blog-cta .btn {
    min-width: unset;
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 0.8125rem;
    letter-spacing: 0.06em;
  }
}

/* Prose overrides for buttons — prevent .prose a color leak */
.prose .btn,
.prose .blog-cta .btn {
  text-decoration: none !important;
  text-decoration-line: none !important;
}

.prose .btn.btn--primary,
.prose .blog-cta .btn.btn--primary {
  color: #0a0a0a !important;
}

.prose .btn.btn--primary:hover,
.prose .blog-cta .btn.btn--primary:hover {
  color: #0a0a0a !important;
  text-decoration: none !important;
}

.prose .btn.btn--secondary,
.prose .blog-cta .btn.btn--secondary {
  color: var(--color-text) !important;
}

.prose .btn.btn--secondary:hover,
.prose .blog-cta .btn.btn--secondary:hover {
  color: var(--color-accent) !important;
  text-decoration: none !important;
}

.prose .btn.btn--secondary:hover {
  color: var(--color-accent);
  text-decoration: none;
}

/* Table of contents inside prose */
.prose .toc {
  background: var(--glass-bg);
  padding: var(--space-xl);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  margin-bottom: 2em;
}

.prose .toc p {
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.prose .toc ul {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.prose .toc li {
  padding-left: 0;
}

.prose .toc a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.prose .toc a:hover {
  color: var(--color-accent);
}

/* FAQ section (schema-friendly) */
.prose .faq-item {
  border-bottom: 1px solid var(--glass-border);
  padding-block: var(--space-lg);
}

.prose .faq-item:last-child {
  border-bottom: none;
}

.prose .faq-item h3 {
  margin-top: 0;
  margin-bottom: var(--space-sm);
  font-size: var(--text-lg);
}

/* ---------- Empty State ---------- */
.blog-empty {
  text-align: center;
  padding: var(--space-4xl) var(--space-xl);
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  max-width: 520px;
  margin-inline: auto;
}

.blog-empty h2 {
  font-size: var(--text-xl);
  color: var(--color-text);
}

.blog-empty p { font-size: var(--text-sm); }

/* ---------- Footer ---------- */
.footer {
  background: var(--color-bg-elevated);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-4xl) var(--space-2xl);
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 400px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.3;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: var(--space-3xl);
  margin-bottom: var(--space-3xl);
}

.footer__brand { display: flex; flex-direction: column; gap: var(--space-md); }

.footer__tagline { font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.6; }

.footer__heading {
  font-size: var(--text-sm); font-weight: 600; color: var(--color-text);
  margin-bottom: var(--space-lg); text-transform: uppercase; letter-spacing: 0.06em;
}

.footer__list { display: flex; flex-direction: column; gap: var(--space-sm); }

.footer__link { font-size: var(--text-sm); color: var(--color-text-secondary); transition: color var(--transition-fast); }
.footer__link:hover { color: var(--color-accent); }
.footer__link--small { font-size: var(--text-xs); }

.footer__info {
  display: flex; align-items: flex-start; gap: var(--space-sm);
  font-size: var(--text-sm); color: var(--color-text-secondary); line-height: 1.5;
}

.footer__info svg { flex-shrink: 0; margin-top: 2px; color: var(--color-accent); }

.divider {
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-border-light), transparent);
  border: none;
}

.footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--space-xl);
}

.footer__copyright { font-size: var(--text-xs); color: var(--color-text-muted); }
.footer__legal { display: flex; gap: var(--space-lg); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .header__links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    gap: var(--space-2xs, 0.375rem);
    background: #08080c;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
    z-index: 999;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0s linear 0.3s;
  }

  .header__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0s linear 0s;
  }

  .header__links li {
    width: 100%;
    max-width: 340px;
    list-style: none;
  }

  .header__link {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.05rem, 3.5vw, 1.25rem);
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.85rem var(--space-lg);
    width: 100%;
    color: var(--color-text-secondary);
    border-radius: var(--radius-lg);
    transition: color 0.2s ease, background 0.2s ease;
  }

  .header__link:hover,
  .header__link:focus-visible {
    color: var(--color-text);
    background: rgba(255, 255, 255, 0.04);
  }

  .header__link--active {
    color: var(--color-accent);
    background: rgba(200, 168, 78, 0.06);
  }

  .header__cta { display: none; }

  .header__mobile-cta {
    display: block;
    list-style: none;
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    width: 100%;
    max-width: 340px;
  }

  .header__mobile-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem var(--space-xl);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--color-accent) 0%, #b8963e 100%);
    color: #0a0a0a;
    border: 1px solid rgba(200, 168, 78, 0.5);
    transition: all var(--transition-base);
  }

  .header__mobile-cta-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
  }

  .header__mobile-langs {
    display: block;
    list-style: none;
    margin-top: var(--space-md);
    width: 100%;
    max-width: 340px;
  }

  .header__languages {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    justify-content: center;
  }

  .header__lang {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    padding: 0.2rem 0.6rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.02);
  }

  /* Burger visible */
  .header__burger { display: flex; }

  /* Burger → X */
  .header__burger.active {
    border-color: rgba(200, 168, 78, 0.15);
  }

  .header__burger.active .header__burger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .header__burger.active .header__burger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
  }

  .header__burger.active .header__burger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 768px) {
  .section { padding-block: var(--space-3xl); }
  .blog-hero .section-label { display: none; }
  .container { padding-inline: var(--space-md); }
  .blog-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-2xl); }
  .footer__brand { grid-column: 1 / -1; }
  .blog-post__header { padding-top: calc(var(--header-height) + var(--space-2xl)); }
}

@media (max-width: 480px) {
  .section { padding-block: var(--space-2xl); }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
  .prose img.alignleft,
  .prose img.alignright {
    float: none;
    max-width: 100%;
    margin: 0 auto 1.5em;
    display: block;
  }
}

/* ---------- Print Styles ---------- */
@media print {
  *, *::before, *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  body {
    font-size: 12pt;
    line-height: 1.5;
    background: #fff !important;
  }
  .header, .footer, .post-nav, .pagination,
  .skip-to-content, .header__burger, .blog-hero .section-label {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
  .blog-post__header {
    padding-top: 0 !important;
  }
  .prose a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666 !important;
  }
  .prose a[href^="#"]::after,
  .prose a[href^="javascript"]::after {
    content: '';
  }
  img {
    max-width: 100% !important;
    page-break-inside: avoid;
  }
  h2, h3 {
    page-break-after: avoid;
  }
}
