/* ============================================
   BLODSALGO BLOG - Complete Standalone Styles
   ============================================ */

/* ---- Self-hosted Fonts ---- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- CSS Custom Properties ---- */
:root {
  --bg-primary: #0F172A;
  --bg-secondary: #0A192F;
  --bg-card: #1E293B;
  --bg-card-hover: #334155;
  --bg-surface: #1E293B;

  --text-primary: #F8FAFC;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;

  --accent: #64FFDA;
  --accent-light: #a7ffeb;
  --accent-dark: #4fd1b0;

  --gradient-primary: linear-gradient(135deg, #64FFDA, #4fd1b0);
  --gradient-text: linear-gradient(135deg, #64FFDA, #FFD700);

  --success: #22c55e;
  --warning: #f59e0b;
  --error: #ef4444;

  --border: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);

  --container-max: 1200px;
  --container-padding: 1.5rem;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 60px rgba(100, 255, 218, 0.15);

  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}


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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

ul { list-style: none; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}


/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  white-space: nowrap;
}

.btn--primary {
  background: var(--gradient-primary);
  color: #030712;
  box-shadow: 0 2px 12px rgba(100, 255, 218, 0.25);
}

.btn--primary:hover {
  box-shadow: 0 4px 24px rgba(100, 255, 218, 0.4);
  transform: translateY(-1px);
}

.btn--outline {
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  background: transparent;
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(100, 255, 218, 0.05);
}

.btn--sm {
  padding: 0.5rem 1rem;
  font-size: 0.82rem;
}


/* ---- Animations ---- */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1rem 0;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 0;
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-right: 1.5rem;
}

.logo-text {
  color: var(--text-primary);
}

.logo-accent {
  color: var(--accent);
}

.navbar__links {
  display: none;
  align-items: center;
  gap: 1.25rem;
}

.navbar__links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  white-space: nowrap;
}

.navbar__links a:hover,
.navbar__links a.active {
  color: var(--text-primary);
}

.navbar__links a.active {
  color: var(--accent);
}

.navbar__ctas {
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-left: 1.5rem;
}

.navbar__toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.navbar__toggle:active {
  background: rgba(255, 255, 255, 0.06);
}

.navbar__toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.navbar__toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  background: var(--accent);
}

.navbar__toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.navbar__toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  background: var(--accent);
}


/* ---- Mobile Menu ---- */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-menu__links a {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.mobile-menu__links a:hover {
  color: var(--text-primary);
}


/* ---- Desktop Nav ---- */
@media (min-width: 1200px) {
  .navbar__links { display: flex; }
  .navbar__ctas { display: flex; }
  .navbar__toggle { display: none; }
}


/* ---- Language Selector ---- */
.lang-selector {
  position: relative;
  z-index: 100;
}

.lang-selector-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.6rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.lang-selector-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-light);
  color: var(--text-primary);
}

.lang-flag {
  font-size: 1.1rem;
  line-height: 1;
}

.lang-chevron {
  width: 12px;
  height: 12px;
  opacity: 0.5;
  transition: transform var(--transition-fast);
}

.lang-selector.open .lang-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all 0.15s ease;
  overflow: hidden;
}

.lang-selector.open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.lang-option:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.lang-option.active {
  color: var(--accent);
  background: rgba(100, 255, 218, 0.06);
}

.lang-option .lang-flag {
  font-size: 1.15rem;
}

.lang-option-name {
  flex: 1;
}

.lang-option .lang-check {
  width: 14px;
  height: 14px;
  opacity: 0;
}

.lang-option.active .lang-check {
  opacity: 1;
  color: var(--accent);
}


/* ============================================
   BLOG HERO — Full visual treatment
   ============================================ */
.blog-hero {
  position: relative;
  padding: 10rem 0 4rem;
  text-align: center;
  overflow: hidden;
  min-height: 420px;
}

/* Background layers */
.blog-hero__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.blog-hero__gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #0A192F 40%, #0F172A 60%, #0d1f3c 100%);
  background-size: 400% 400%;
  animation: blog-gradient-shift 20s ease infinite;
}

@keyframes blog-gradient-shift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.blog-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 20%, transparent 65%);
}

/* Animated glows */
.blog-hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
  will-change: transform;
  animation: blog-glow-drift 25s ease-in-out infinite alternate;
}

@keyframes blog-glow-drift {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(30px, -20px); }
}

.blog-hero__glow--1 {
  width: 500px;
  height: 500px;
  background: var(--accent);
  top: -15%;
  right: -5%;
  opacity: 0.08;
}

.blog-hero__glow--2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -10%;
  left: -5%;
  opacity: 0.06;
  animation-direction: alternate-reverse;
  animation-duration: 30s;
}

.blog-hero__glow--3 {
  width: 350px;
  height: 350px;
  background: #FFD700;
  top: 30%;
  left: 25%;
  opacity: 0.04;
  animation-duration: 28s;
}

/* Floating shapes */
.blog-hero__shape {
  position: absolute;
  border: 1px solid rgba(100, 255, 218, 0.06);
  pointer-events: none;
  animation: blog-shape-drift 20s ease-in-out infinite alternate;
}

.blog-hero__shape--1 {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  top: 15%;
  right: 12%;
}

.blog-hero__shape--2 {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  bottom: 20%;
  left: 8%;
  border-color: rgba(255, 215, 0, 0.04);
  animation-duration: 25s;
  animation-direction: alternate-reverse;
}

.blog-hero__shape--3 {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  top: 35%;
  left: 15%;
  animation-duration: 18s;
}

@keyframes blog-shape-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(20px, -15px); }
}

/* Rising particles */
.blog-hero__particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.blog-hero__particles span {
  position: absolute;
  bottom: -5%;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: rgba(100, 255, 218, 0.7);
  box-shadow: 0 0 10px rgba(100, 255, 218, 0.5), 0 0 25px rgba(100, 255, 218, 0.2);
  animation: blog-particle-rise var(--d) var(--del) linear infinite;
  will-change: transform, opacity;
}

@keyframes blog-particle-rise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  10% { opacity: 1; }
  50% {
    opacity: 0.8;
    transform: translateY(-55vh) scale(1);
  }
  80% { opacity: 0.4; }
  100% {
    opacity: 0;
    transform: translateY(-110vh) scale(0.6);
  }
}

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

/* Badge */
.blog-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid rgba(100, 255, 218, 0.2);
  border-radius: 100px;
  background: rgba(100, 255, 218, 0.06);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 1.5rem;
  animation: blog-fade-in 0.8s ease both;
}

.blog-hero__badge svg {
  flex-shrink: 0;
}

/* Title */
.blog-hero h1 {
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.15;
  animation: blog-fade-in 0.8s 0.1s ease both;
}

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

/* Subtitle */
.blog-hero__subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.6;
  animation: blog-fade-in 0.8s 0.2s ease both;
}

/* Stats row */
.blog-hero__stats {
  display: inline-flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.75rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 100px;
  animation: blog-fade-in 0.8s 0.3s ease both;
}

.blog-hero__stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.blog-hero__stat-icon {
  color: var(--accent);
  display: flex;
}

.blog-hero__stat-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.blog-hero__stat-divider {
  width: 1px;
  height: 20px;
  background: var(--border-light);
}

@keyframes blog-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ============================================
   BLOG FILTERS
   ============================================ */
.blog-content {
  padding: 0 0 5rem;
}

.blog-filters {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  padding: 0 var(--container-padding);
}

.blog-filters__pill {
  padding: 0.5rem 1.25rem;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.blog-filters__pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-filters__pill.active {
  background: var(--accent);
  color: #030712;
  border-color: var(--accent);
  font-weight: 600;
}

@media (max-width: 480px) {
  .blog-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
  }
  .blog-filters::-webkit-scrollbar {
    display: none;
  }
}


/* ============================================
   POST CARDS GRID
   ============================================ */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(100, 255, 218, 0.2);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(100, 255, 218, 0.08);
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.post-card__category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(100, 255, 218, 0.12);
  color: var(--accent);
}

.post-card__date {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card__title {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
  flex-grow: 0;
}

.post-card__title a {
  color: var(--text-primary);
  transition: color var(--transition-fast);
}

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

.post-card__excerpt {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 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: 1rem;
  border-top: 1px solid var(--border);
}

.post-card__time {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.post-card__link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
  transition: opacity var(--transition-fast);
}

.post-card__link:hover {
  opacity: 0.8;
}

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

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


/* ============================================
   PAGINATION
   ============================================ */
.blog-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 0 var(--container-padding);
}

.blog-pagination__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.blog-pagination__btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.blog-pagination__btn.active {
  background: var(--accent);
  color: #030712;
  border-color: var(--accent);
}


/* ============================================
   EMPTY STATE
   ============================================ */
.blog-empty {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  position: relative;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  max-width: 560px;
  margin: 0 auto;
  overflow: hidden;
}

.blog-empty__glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 200px;
  background: radial-gradient(ellipse, rgba(100, 255, 218, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.blog-empty__icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(100, 255, 218, 0.06);
  border: 1px solid rgba(100, 255, 218, 0.12);
  border-radius: 50%;
}

.blog-empty__icon {
  width: 32px;
  height: 32px;
  color: var(--accent);
  opacity: 0.8;
}

.blog-empty__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.blog-empty__desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 400px;
  margin: 0 auto 1.5rem;
}

.blog-empty__tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.blog-empty__tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.85rem;
  border: 1px solid var(--border-light);
  border-radius: 100px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 1.5rem;
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer__brand {
  max-width: 320px;
}

.footer__brand .navbar__logo {
  display: inline-block;
  margin-bottom: 0.75rem;
}

.footer__brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer__links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.85rem;
  color: var(--text-secondary);
}

.footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer__links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

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

.footer__disclaimer {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.footer__disclaimer p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

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

.footer__bottom-links a {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.footer__bottom-links a:hover {
  color: var(--accent);
}

@media (min-width: 640px) {
  .footer__grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}


/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(30, 41, 59, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border-light);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.visible {
  transform: translateY(0);
}

.cookie-banner__text {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.5;
}

.cookie-banner__text a {
  color: var(--accent);
}

.cookie-banner__text a:hover {
  text-decoration: underline;
}

.cookie-banner__actions {
  display: flex;
  gap: 0.75rem;
  flex-shrink: 0;
}


/* ============================================
   ARTICLE PAGE STYLES
   ============================================ */

/* Progress bar */
.article-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--gradient-primary);
  z-index: 1001;
  transition: width 0.1s linear;
}

/* Back link */
.article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8rem 0 1.5rem;
  transition: color var(--transition-fast);
}

.article-back:hover {
  color: var(--accent);
}

/* Article header */
.article-header {
  max-width: 780px;
  margin: 0 auto 2.5rem;
  padding: 0 var(--container-padding);
}

.article-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.article-header__category {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 100px;
  background: rgba(100, 255, 218, 0.12);
  color: var(--accent);
  box-shadow: 0 0 16px rgba(100, 255, 218, 0.2);
}

.article-header__date,
.article-header__reading-time {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.article-header__date::before {
  content: '📅 ';
  opacity: 0.6;
}

.article-header__reading-time::before {
  content: '⏱ ';
  opacity: 0.6;
}

.article-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.article-header__desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Language switcher */
.article-lang-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.article-lang-switcher a {
  display: inline-flex;
  padding: 0.2rem;
  border-radius: 3px;
  opacity: 0.5;
  transition: opacity var(--transition-fast);
}

.article-lang-switcher a:hover,
.article-lang-switcher a.active {
  opacity: 1;
}

/* Article content / prose */
.article-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 var(--container-padding) 4rem;
}

.article-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #A0AEC0;
  margin-bottom: 1.5rem;
  text-rendering: optimizeLegibility;
}

.article-content h2 + p::first-letter {
  font-size: 2.2em;
  font-weight: 800;
  color: var(--accent);
  float: left;
  line-height: 0.9;
  margin-right: 0.1em;
  margin-top: 0.1em;
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #64FFDA 0%, #F8FAFC 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-top: 3.5rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 1rem;
}

.article-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.article-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin-top: 3rem;
  margin-bottom: 0.75rem;
}

.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  transition: all 0.25s ease;
}

.article-content a:hover {
  color: var(--accent-light);
  text-decoration-thickness: 3px;
  text-shadow: 0 0 8px rgba(100, 255, 218, 0.4);
}

.article-content a[target="_blank"]::after {
  content: ' ↗';
  font-size: 0.8em;
  opacity: 0.6;
  margin-left: 0.15em;
}

.article-content ul,
.article-content ol {
  margin-bottom: 2rem;
  padding-left: 1.75rem;
}

.article-content li {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.article-content ol { list-style: decimal; }
.article-content ul { list-style: disc; }

.article-content ul li::marker {
  color: var(--accent);
  font-size: 1.2em;
}

.article-content ol li::marker {
  color: var(--accent);
  font-weight: 600;
}

.article-content table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(100, 255, 218, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  margin: 2rem 0 2.5rem;
}

.article-content thead {
  background: linear-gradient(135deg, rgba(100,255,218,0.08), rgba(100,255,218,0.04));
  border-bottom: 2px solid rgba(100, 255, 218, 0.3);
}

.article-content thead th {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  padding: 1rem 1.25rem;
  text-align: left;
}

.article-content tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background-color 0.25s ease;
}

.article-content tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.article-content tbody tr:hover {
  background: rgba(100, 255, 218, 0.05);
}

.article-content td {
  padding: 1rem 1.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.article-content tbody tr td:first-child {
  font-weight: 600;
  color: #CBD5E0;
}

.article-content code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  background: var(--bg-card);
  padding: 0.2em 0.5em;
  border-radius: 4px;
  color: var(--accent);
  border: 1px solid rgba(100, 255, 218, 0.15);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.article-content pre {
  background: linear-gradient(to bottom, var(--bg-card), #1a2332);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 2rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
}

.article-content pre code {
  background: none;
  padding: 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-secondary);
  border: none;
  box-shadow: none;
}

.article-content pre::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.article-content pre::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
}

.article-content pre::-webkit-scrollbar-thumb:hover {
  background: var(--accent-light);
}

.article-content blockquote {
  position: relative;
  border-left: 4px solid var(--accent);
  background: linear-gradient(to bottom, rgba(100,255,218,0.06), rgba(100,255,218,0.02));
  padding: 1.25rem 1.5rem 1.25rem 2rem;
  margin-bottom: 2rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  box-shadow: 0 0 20px rgba(100, 255, 218, 0.08);
}

.article-content blockquote::before {
  content: '"';
  position: absolute;
  top: -0.25rem;
  left: 0.5rem;
  font-size: 4rem;
  color: var(--accent);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
  pointer-events: none;
}

.article-content blockquote p {
  font-size: 1.08rem;
  line-height: 1.7;
  color: #B0BEC5;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content img {
  border-radius: var(--radius-md);
  margin: 1.5rem 0;
}

.article-content strong {
  color: var(--accent);
  font-weight: 700;
  transition: color 0.2s ease;
}

/* TL;DR box */
.article-tldr {
  position: relative;
  background: radial-gradient(ellipse at top, rgba(100,255,218,0.08), rgba(100,255,218,0.03));
  border: 1px solid rgba(100, 255, 218, 0.15);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 1.5rem 2.5rem 1.5rem 1.5rem;
  margin-bottom: 3rem;
  box-shadow: 0 8px 32px rgba(100, 255, 218, 0.15);
}

.article-tldr::before {
  content: '⚡';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  opacity: 0.3;
}

.article-tldr h4 {
  display: none;
}

.article-tldr__title {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.article-tldr p {
  margin-bottom: 0.5rem;
  font-size: 1rem;
  color: var(--text-secondary);
}

.article-tldr p:last-child {
  margin-bottom: 0;
}

.article-tldr ul {
  margin-bottom: 0;
}

.article-tldr ul li::marker {
  color: var(--accent);
}

.article-tldr li:hover {
  filter: brightness(1.1);
  transition: filter 0.2s ease;
}

/* Risk disclaimer */
.article-risk {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: 4px solid var(--warning);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.5rem 1.25rem 2.5rem;
  margin-top: 2.5rem;
}

.article-risk::before {
  content: '⚠';
  position: absolute;
  top: 1.25rem;
  left: 0.75rem;
  font-size: 1.25rem;
  color: var(--warning);
  opacity: 0.6;
}

.article-risk p {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0;
  line-height: 1.7;
}

.article-risk strong {
  color: var(--warning);
  font-weight: 600;
}

/* Enhanced vertical spacing */
.article-content p + h2 {
  margin-top: 3.5rem;
}

.article-content p + h3 {
  margin-top: 3rem;
}

.article-content ul + *,
.article-content ol + * {
  margin-top: 2rem;
}

.article-content table + * {
  margin-top: 2.5rem;
}

.article-content blockquote + * {
  margin-top: 2rem;
}

/* Custom text selection */
.article-content ::selection {
  background: var(--accent);
  color: #030712;
}

.article-content ::-moz-selection {
  background: var(--accent);
  color: #030712;
}

/* Image enhancements (if images exist) */
.article-content img {
  border-radius: var(--radius-md);
  margin: 2rem 0;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease;
}

.article-content img:hover {
  transform: scale(1.02);
}

/* Improved scrollbar */
.article-content::-webkit-scrollbar {
  width: 10px;
}

.article-content::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

.article-content::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 5px;
  transition: background 0.3s ease;
}

.article-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}


/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}


/* ============================================
   ANIMATIONS
   ============================================ */
/* Subtle fade-in animation on scroll */
@keyframes fade-slide-up {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.article-content h2 {
  animation: fade-slide-up 0.6s ease both;
}

.article-content table {
  animation: fade-slide-up 0.6s ease both;
  animation-delay: 0.1s;
}

.article-content blockquote {
  animation: fade-slide-up 0.6s ease both;
  animation-delay: 0.05s;
}


/* ============================================
   RESPONSIVE — Mobile adjustments
   ============================================ */
@media (max-width: 768px) {
  .blog-hero {
    padding: 7rem 0 2rem;
  }
  .blog-hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }
  .lang-selector-btn {
    padding: 0.3rem 0.5rem;
    font-size: 0.8rem;
  }
  .lang-dropdown {
    min-width: 150px;
  }
  .article-header h1 {
    font-size: 1.6rem;
  }
}

@media (max-width: 480px) {
  .post-card {
    padding: 1.25rem;
  }
  .post-card__title {
    font-size: 1.05rem;
  }
}


/* ============================================
   RTL SUPPORT (Arabic)
   ============================================ */
[dir="rtl"] .article-content,
[lang="ar"] .article-content {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .article-header,
[lang="ar"] .article-header {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .article-tldr,
[lang="ar"] .article-tldr {
  direction: rtl;
  text-align: right;
  border-left: none;
  border-right: 3px solid var(--accent);
  padding-left: 0;
  padding-right: 1.25rem;
}

[dir="rtl"] .article-back,
[lang="ar"] .article-back {
  direction: rtl;
}

[dir="rtl"] .article-content blockquote,
[lang="ar"] .article-content blockquote {
  border-left: none;
  border-right: 4px solid var(--accent);
  padding-left: 1.5rem;
  padding-right: 2rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

[dir="rtl"] .article-content blockquote::before,
[lang="ar"] .article-content blockquote::before {
  left: auto;
  right: 0.5rem;
}

[dir="rtl"] .article-content ul,
[dir="rtl"] .article-content ol,
[lang="ar"] .article-content ul,
[lang="ar"] .article-content ol {
  padding-left: 0;
  padding-right: 1.5rem;
}

[dir="rtl"] .article-lang-switcher,
[lang="ar"] .article-lang-switcher {
  direction: ltr;
}

/* ── CTA Block (conversion sections in articles) ──────────────────── */
.article-content .cta-block {
  background: linear-gradient(135deg, rgba(100,255,218,.08), rgba(11,196,158,.05));
  border: 1px solid rgba(100,255,218,.25);
  border-left: 4px solid #64FFDA;
  border-radius: 12px;
  padding: 1.75rem 2rem;
  margin: 2.5rem 0;
}
.article-content .cta-block h2 {
  color: #64FFDA;
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}
.article-content .cta-block p {
  color: #CBD5E1;
  margin-bottom: 1.25rem;
}
.article-content .cta-block a {
  display: inline-block;
  background: linear-gradient(135deg, #64FFDA, #0BC49E);
  color: #0F172A;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  margin-right: 0.75rem;
  margin-bottom: 0.5rem;
  transition: opacity .2s, transform .1s;
}
.article-content .cta-block a:hover {
  opacity: .88;
  transform: translateY(-1px);
}
.article-content .cta-block a.secondary {
  background: transparent;
  border: 1px solid rgba(100,255,218,.4);
  color: #64FFDA;
}
