/* ============================================
   AI HACK LAB - Static Site CSS
   Dark tech aesthetic, SEO-optimized, fast
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* === CSS VARIABLES === */
:root {
  --bg-primary: #0a0b0f;
  --bg-secondary: #0f1117;
  --bg-card: #13151d;
  --bg-card-hover: #181b26;
  --border: #1e2235;
  --border-bright: #2a3050;

  --text-primary: #eef0f8;
  --text-secondary: #8b90a8;
  --text-muted: #555a72;

  --accent-cyan: #00d4ff;
  --accent-purple: #8b5cf6;
  --accent-pink: #e040fb;
  --accent-green: #00e5a0;

  --gradient-hero: linear-gradient(135deg, #0a0b0f 0%, #0d1020 40%, #0f0a1a 100%);
  --gradient-accent: linear-gradient(90deg, var(--accent-cyan), var(--accent-purple));
  --gradient-card: linear-gradient(145deg, #13151d, #0f1117);

  --font-display: 'Manrope', sans-serif;
  --font-body: 'Manrope', sans-serif;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-hover: 0 8px 40px rgba(0,212,255,0.1);
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

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

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* === NOISE TEXTURE OVERLAY === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* === HEADER / NAV === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 11, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-secondary);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-primary);
  background: var(--bg-card);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple)) !important;
  color: #000 !important;
  font-weight: 700 !important;
  padding: 7px 16px !important;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  background: var(--bg-card) !important;
}

.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--gradient-hero);
  padding: 80px 24px;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 20% 50%, rgba(0,212,255,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 50% 50% at 80% 30%, rgba(139,92,246,0.07) 0%, transparent 70%);
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}

.hero-content {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-text { z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  animation: pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.hero h1 .gradient-text {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #000;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,212,255,0.3);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-bright);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  transition: var(--transition);
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.05);
}

.hero-featured {
  position: relative;
}

.hero-featured-post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
}

.hero-featured-post:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
}

.hero-featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.hero-featured-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, #1a1d2e, #0f1020);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.hero-featured-body {
  padding: 24px;
}

.hero-featured-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cat-tag {
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  background: rgba(0,212,255,0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0,212,255,0.2);
}

.cat-tag.purple { background: rgba(139,92,246,0.1); color: var(--accent-purple); border-color: rgba(139,92,246,0.2); }
.cat-tag.pink { background: rgba(224,64,251,0.1); color: var(--accent-pink); border-color: rgba(224,64,251,0.2); }
.cat-tag.green { background: rgba(0,229,160,0.1); color: var(--accent-green); border-color: rgba(0,229,160,0.2); }

.hero-featured-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hero-featured-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* === MAIN LAYOUT === */
.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  padding-top: 64px;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 22px;
  background: var(--gradient-accent);
  border-radius: 4px;
}

.section-link {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  transition: var(--transition);
}

.section-link:hover { opacity: 0.7; }

/* === POST GRID === */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.posts-grid.two-col {
  grid-template-columns: repeat(2, 1fr);
}

.posts-grid.featured-first {
  grid-template-columns: 2fr 1fr 1fr;
}

/* === POST CARD === */
.post-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
}

.post-card:hover {
  border-color: rgba(0,212,255,0.25);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.post-card-img-wrap {
  overflow: hidden;
  aspect-ratio: 16/9;
  position: relative;
  background: linear-gradient(135deg, #1a1d2e, #0f1020);
}

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

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

.post-card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: linear-gradient(135deg, #1a1d2e, #0f1020);
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-card-cats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.post-card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 8px;
  flex: 1;
  transition: color 0.2s;
}

.post-card:hover .post-card-title {
  color: var(--accent-cyan);
}

.post-card-excerpt {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.post-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.post-card-date {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.read-more {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.read-more:hover { gap: 8px; }

/* === FEATURED LARGE CARD === */
.post-card.large .post-card-img-wrap {
  aspect-ratio: 4/3;
}

.post-card.large .post-card-title {
  font-size: 1.25rem;
}

.post-card.large .post-card-excerpt {
  -webkit-line-clamp: 3;
}

/* === CATEGORY PAGE === */
.page-header {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.page-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.breadcrumb {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.breadcrumb a {
  color: var(--accent-cyan);
  transition: opacity 0.2s;
}

.breadcrumb a:hover { opacity: 0.7; }

.breadcrumb span { color: var(--text-muted); }

.page-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 600px;
}

/* === SINGLE POST === */
.post-single {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 24px;
}

.post-header {
  padding: 64px 0 48px;
}

.post-header .post-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.post-header h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
  padding-bottom: 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-featured-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  border: 1px solid var(--border);
}

.post-featured-img-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  margin-bottom: 40px;
  background: linear-gradient(135deg, #1a1d2e, #0f1020);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border: 1px solid var(--border);
}

/* === POST CONTENT TYPOGRAPHY === */
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.post-content h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 48px 0 20px;
  color: var(--text-primary);
}

.post-content h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 36px 0 16px;
  color: var(--text-primary);
}

.post-content h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  margin: 28px 0 12px;
  color: var(--text-primary);
}

.post-content p {
  margin-bottom: 20px;
  color: var(--text-primary);
}

.post-content ul, .post-content ol {
  margin: 20px 0 24px 24px;
}

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

.post-content li {
  margin-bottom: 8px;
  color: var(--text-primary);
}

.post-content a {
  color: var(--accent-cyan);
  text-decoration: underline;
  text-decoration-color: rgba(0,212,255,0.3);
  transition: var(--transition);
}

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

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

.post-content blockquote {
  border-left: 3px solid var(--accent-purple);
  padding: 16px 24px;
  margin: 28px 0;
  background: rgba(139,92,246,0.05);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.post-content blockquote p { color: var(--text-secondary); margin-bottom: 0; font-style: italic; }

.post-content pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  overflow-x: auto;
  margin: 24px 0;
  font-size: 0.9rem;
}

.post-content code {
  background: rgba(0,212,255,0.08);
  color: var(--accent-cyan);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  font-family: 'Fira Code', monospace;
}

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

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

.post-content img {
  border-radius: var(--radius-md);
  margin: 24px auto;
  border: 1px solid var(--border);
  max-width: 100%;
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.9rem;
}

.post-content th {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--border);
  text-align: left;
}

.post-content td {
  padding: 10px 16px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.post-content tr:hover td {
  background: rgba(255,255,255,0.02);
}

/* === RELATED POSTS === */
.related-posts {
  margin-top: 72px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
}

/* === SIDEBAR === */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 48px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 88px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-title::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gradient-accent);
  border-radius: 3px;
}

.sidebar-post {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.sidebar-post:last-child { border-bottom: none; }
.sidebar-post:hover { opacity: 0.8; }

.sidebar-post-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.sidebar-post-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 4px;
}

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

.cat-list { display: flex; flex-direction: column; gap: 8px; }

.cat-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  transition: var(--transition);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.cat-list-item:hover {
  background: var(--bg-card-hover);
  color: var(--accent-cyan);
}

.cat-list-count {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-primary);
  padding: 2px 8px;
  border-radius: 100px;
}

/* === NEWSLETTER === */
.newsletter-widget {
  background: linear-gradient(135deg, rgba(0,212,255,0.05), rgba(139,92,246,0.08));
  border: 1px solid rgba(0,212,255,0.2);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin: 64px 0;
  text-align: center;
}

.newsletter-widget h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.newsletter-widget p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

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

.newsletter-form input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  padding: 11px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition);
}

.newsletter-form input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.1);
}

.newsletter-form button {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.newsletter-form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* === PAGINATION === */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 48px 0;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.page-btn:hover, .page-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border-color: transparent;
  color: #000;
}

/* === FOOTER === */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 56px 24px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .site-logo { margin-bottom: 16px; }

.footer-brand p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
}

.footer-social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-social a:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.footer-col-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

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

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-copyright {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-copyright a { color: var(--accent-cyan); }

/* === SEARCH === */
.search-bar {
  position: relative;
  max-width: 400px;
}

.search-input {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 9px 40px 9px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.88rem;
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}

.search-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

/* === STATS BAR === */
.stats-bar {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* === MOBILE NAV OVERLAY === */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10,11,15,0.97);
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
}

.mobile-nav.open { display: flex; }
.mobile-nav a {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: var(--transition);
}
.mobile-nav a:hover { color: var(--accent-cyan); }

.mobile-nav-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* === SCROLL TO TOP === */
.scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  border: none;
  border-radius: var(--radius-md);
  color: #000;
  font-size: 1rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  transition: var(--transition);
}

.scroll-top.visible { display: flex; }
.scroll-top:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,212,255,0.3); }

/* === ANIMATIONS === */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .posts-grid { grid-template-columns: repeat(2, 1fr); }
  .posts-grid.featured-first { grid-template-columns: 1fr 1fr; }
  .posts-grid.featured-first .post-card:first-child { grid-column: 1 / -1; }
  .hero-content { grid-template-columns: 1fr; gap: 40px; }
  .hero-featured { max-width: 480px; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: block; }
  .posts-grid { grid-template-columns: 1fr; }
  .posts-grid.two-col { grid-template-columns: 1fr; }
  .hero { padding: 60px 24px; }
  .hero-content { gap: 32px; }
  .hero-featured { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .newsletter-form { flex-direction: column; }
  .stats-bar { gap: 20px; }
  .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .post-header h1 { font-size: 1.6rem; }
  .nav-inner { padding: 0 16px; }
  .site-main { padding: 0 16px; }
}

/* ============================================
   SIDEBAR & POST LAYOUT UPDATE
   ============================================ */

.post-with-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

.post-main-col {
  min-width: 0; /* prevent overflow */
}

/* Post header inside sidebar layout */
.post-with-sidebar .post-header {
  padding: 48px 0 32px;
}

.post-with-sidebar .post-featured-img,
.post-with-sidebar .post-featured-img-placeholder {
  width: 100%;
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}

.post-with-sidebar .post-content {
  font-size: 1rem;
  line-height: 1.8;
}

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

.post-sidebar {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 48px;
}

.sidebar-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  overflow: hidden;
}

.sidebar-widget-title {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-widget-title::before {
  content: '';
  width: 3px;
  height: 12px;
  background: var(--gradient-accent);
  border-radius: 3px;
  flex-shrink: 0;
}

/* Baner widget */
.sidebar-banner {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  aspect-ratio: 1/1;
  max-width: 300px;
}

.sidebar-banner:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 4px 20px rgba(0,212,255,0.15);
  transform: translateY(-2px);
}

.sidebar-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sidebar-banner-placeholder {
  width: 100%;
  aspect-ratio: 1/1;
  background: linear-gradient(135deg, #13151d, #0f1020);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.82rem;
  text-align: center;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 2px dashed var(--border-bright);
}

.sidebar-banner-placeholder .icon { font-size: 1.8rem; }

/* Newsletter sidebar */
.sidebar-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar-newsletter-form input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-bright);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: var(--transition);
}

.sidebar-newsletter-form input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0,212,255,0.08);
}

.sidebar-newsletter-form button {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  border: none;
  padding: 10px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-newsletter-form button:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

/* Recent posts sidebar */
.sidebar-recent-post {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: var(--transition);
}

.sidebar-recent-post:last-child { border-bottom: none; padding-bottom: 0; }
.sidebar-recent-post:first-child { padding-top: 0; }

.sidebar-recent-post:hover .sidebar-rp-title {
  color: var(--accent-cyan);
}

.sidebar-rp-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background: var(--bg-secondary);
}

.sidebar-rp-img-placeholder {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sidebar-rp-title {
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-rp-date {
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* ============================================
   SOCIAL SHARE
   ============================================ */

.social-share {
  margin-top: 48px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.social-share-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.social-share-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.share-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }

.share-btn.twitter  { background: #000; color: #fff; }
.share-btn.facebook { background: #1877f2; color: #fff; }
.share-btn.linkedin { background: #0a66c2; color: #fff; }
.share-btn.copy     { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-bright); }
.share-btn.copy.copied { background: rgba(0,229,160,0.1); color: var(--accent-green); border-color: var(--accent-green); }

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

.cookie-banner {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  width: calc(100% - 48px);
  max-width: 680px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  animation: slideUp 0.4s ease;
}

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

.cookie-banner.hidden { display: none; }

.cookie-icon { font-size: 1.8rem; flex-shrink: 0; }

.cookie-text { flex: 1; }

.cookie-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.cookie-text a { color: var(--accent-cyan); text-decoration: underline; }

.cookie-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  border: none;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-btn-accept:hover { opacity: 0.9; }

.cookie-btn-decline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 9px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.cookie-btn-decline:hover { border-color: var(--text-muted); color: var(--text-primary); }

/* ============================================
   VISIT COUNTER
   ============================================ */

.visit-counter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
}

.visit-counter .count { color: var(--accent-cyan); font-weight: 700; font-family: var(--font-display); }

/* ============================================
   LEGAL PAGES
   ============================================ */

.legal-page {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-page h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 36px 0 12px;
  color: var(--text-primary);
}

.legal-page p {
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.legal-page ul {
  color: var(--text-secondary);
  margin: 12px 0 16px 24px;
  font-size: 0.95rem;
  list-style: disc;
}

.legal-page li { margin-bottom: 6px; line-height: 1.7; }

.legal-page a { color: var(--accent-cyan); }

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

@media (max-width: 1024px) {
  .post-with-sidebar {
    grid-template-columns: 1fr;
  }
  .post-sidebar {
    position: static;
    padding-top: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .post-with-sidebar { padding: 0 16px; }
  .post-sidebar { grid-template-columns: 1fr; }
  .cookie-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }
  .cookie-banner.hidden { display: none; }
  .cookie-actions { width: 100%; }
  .cookie-btn-accept, .cookie-btn-decline { flex: 1; }
  .social-share-buttons { gap: 8px; }
  .share-btn { padding: 8px 12px; font-size: 0.78rem; }
}

/* ============================================
   HOMEPAGE V2 — HERO, FEATURED, TOOLS, CATS
   ============================================ */

/* Hero V2 */
.hero-v2 {
  position: relative;
  min-height: 560px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--gradient-hero);
  padding: 80px 24px 64px;
  text-align: center;
}

.hero-v2-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 30% 40%, rgba(0,212,255,0.07) 0%, transparent 70%),
    radial-gradient(ellipse 60% 60% at 70% 60%, rgba(139,92,246,0.08) 0%, transparent 70%);
  background-image:
    linear-gradient(rgba(0,212,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 20%, transparent 100%);
}

.hero-v2-content {
  position: relative;
  max-width: 760px;
  width: 100%;
  z-index: 1;
}

.hero-v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
}

.hero-v2 h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
}

.hero-v2-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 580px;
  margin: 0 auto 36px;
}

/* Hero Search */
.hero-search {
  margin-bottom: 36px;
}

.hero-search-inner {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 6px 6px 6px 20px;
  gap: 10px;
  max-width: 580px;
  margin: 0 auto;
  transition: var(--transition);
}

.hero-search-inner:focus-within {
  border-color: var(--accent-cyan);
  background: rgba(0,212,255,0.04);
  box-shadow: 0 0 0 4px rgba(0,212,255,0.08);
}

.hero-search-icon { font-size: 1rem; flex-shrink: 0; }

.hero-search-inner input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 8px 0;
  min-width: 0;
}

.hero-search-inner input::placeholder { color: var(--text-muted); }

.hero-search-btn {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  border: none;
  padding: 10px 22px;
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-search-btn:hover { opacity: 0.9; transform: scale(1.02); }

.hero-search-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.search-tag {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.78rem;
  transition: var(--transition);
}

.search-tag:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); background: rgba(0,212,255,0.06); }

.hero-v2-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

/* Home sections */
.home-section { padding-top: 64px; }

/* Featured grid */
.featured-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.featured-grid-side {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.featured-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.featured-card:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.featured-card-img {
  display: block;
  overflow: hidden;
}

.featured-card--big .featured-card-img {
  aspect-ratio: 16/10;
}

.featured-card .featured-card-img {
  aspect-ratio: 16/9;
}

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

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

.featured-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }

.featured-card-title {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  margin: 8px 0 6px;
  flex: 1;
}

.featured-card--big .featured-card-title { font-size: 1.3rem; }
.featured-card .featured-card-title { font-size: 1rem; }

.featured-card-title a { color: var(--text-primary); transition: color 0.2s; }
.featured-card:hover .featured-card-title a { color: var(--accent-cyan); }

.featured-card-excerpt {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Categories grid */
.cats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.cat-card:hover {
  border-color: rgba(0,212,255,0.3);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.cat-card-icon { font-size: 2.2rem; }
.cat-card-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); }
.cat-card-count { font-size: 0.82rem; color: var(--text-muted); }

/* Trending Tools grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: var(--transition);
  text-decoration: none;
}

.tool-card:hover {
  border-color: rgba(0,212,255,0.3);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0,212,255,0.1);
}

.tool-emoji { font-size: 1.6rem; flex-shrink: 0; }

.tool-info { flex: 1; min-width: 0; }
.tool-name { font-family: var(--font-display); font-size: 0.9rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.tool-desc { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tool-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-green);
  background: rgba(0,229,160,0.08);
  border: 1px solid rgba(0,229,160,0.2);
  padding: 3px 8px;
  border-radius: 100px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Footer extras */
.footer-recent-posts { display: flex; flex-direction: column; gap: 6px; }
.footer-recent-post { display: flex; flex-direction: column; gap: 2px; font-size: 0.83rem; color: var(--text-secondary); transition: color 0.2s; padding: 4px 0; border-bottom: 1px solid var(--border); }
.footer-recent-post:last-child { border-bottom: none; }
.footer-recent-post:hover { color: var(--accent-cyan); }
.footer-recent-post time { font-size: 0.72rem; color: var(--text-muted); }
.cat-count { color: var(--text-muted); }
.footer-bottom-links { display: flex; gap: 16px; }
.footer-bottom-links a { font-size: 0.82rem; color: var(--text-muted); transition: color 0.2s; }
.footer-bottom-links a:hover { color: var(--accent-cyan); }

.footer-tags { padding: 32px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud-item {
  font-size: 0.78rem; font-weight: 600; color: var(--text-muted);
  background: var(--bg-primary); border: 1px solid var(--border);
  padding: 4px 12px; border-radius: 100px; transition: var(--transition); cursor: default;
}
.tag-cloud-item:hover { color: var(--accent-cyan); border-color: rgba(0,212,255,0.3); background: rgba(0,212,255,0.05); }

/* Responsive home */
@media (max-width: 1024px) {
  .tools-grid { grid-template-columns: repeat(2, 1fr); }
  .featured-grid { grid-template-columns: 1fr; }
  .featured-grid-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .cats-grid { grid-template-columns: 1fr 1fr; }
  .tools-grid { grid-template-columns: 1fr 1fr; }
  .featured-grid-side { grid-template-columns: 1fr; }
  .hero-v2 { padding: 60px 16px 48px; min-height: auto; }
  .hero-v2 h1 { font-size: 2rem; }
}
@media (max-width: 480px) {
  .cats-grid { grid-template-columns: 1fr; }
  .tools-grid { grid-template-columns: 1fr; }
  .hero-search-inner { padding: 4px 4px 4px 14px; border-radius: var(--radius-lg); }
  .hero-search-btn { padding: 8px 14px; font-size: 0.8rem; }
}

/* ============================================
   HERO SPLIT — Left text + Right featured cards
   ============================================ */

.hero-split {
  position: relative;
  overflow: hidden;
  background: var(--gradient-hero);
  padding: 64px 0 56px;
}

.hero-split-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 15% 50%, rgba(0,212,255,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 45% 60% at 85% 30%, rgba(139,92,246,0.07) 0%, transparent 65%);
  background-image:
    linear-gradient(rgba(0,212,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 20%, transparent 100%);
  pointer-events: none;
}

.hero-split-inner {
  position: relative;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
}

/* LEFT */
.hero-split-left { z-index: 1; }

.hero-split-left .hero-v2-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  background: rgba(0,212,255,0.08);
  border: 1px solid rgba(0,212,255,0.2);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 22px;
}

.hero-split-left h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  text-align: left;
}

.hero-split-left .hero-v2-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
  text-align: left;
  max-width: 100%;
}

.hero-split-left .hero-search { margin-bottom: 28px; }

.hero-split-left .hero-search-inner { max-width: 100%; margin: 0; }

.hero-split-left .hero-search-tags {
  justify-content: flex-start;
  margin-top: 10px;
}

.hero-split-left .hero-v2-stats {
  justify-content: flex-start;
  gap: 24px;
}

/* RIGHT — featured cards stack */
.hero-split-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  z-index: 1;
}

/* Big featured card */
.hero-feat-card--big {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.hero-feat-card--big:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 8px 32px rgba(0,212,255,0.12);
  transform: translateY(-3px);
}

.hero-feat-card--big .hero-feat-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.hero-feat-card--big .hero-feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-feat-card--big:hover .hero-feat-img img { transform: scale(1.04); }

.hero-feat-card--big .hero-feat-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-feat-card--big .hero-feat-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
}

.hero-feat-card--big .hero-feat-title a { color: var(--text-primary); transition: color 0.2s; }
.hero-feat-card--big:hover .hero-feat-title a { color: var(--accent-cyan); }

.hero-feat-excerpt {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
}

/* Small cards row */
.hero-feat-small-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hero-feat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.hero-feat-card:hover {
  border-color: rgba(0,212,255,0.3);
  box-shadow: 0 4px 20px rgba(0,212,255,0.1);
  transform: translateY(-2px);
}

.hero-feat-card .hero-feat-img {
  display: block;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.hero-feat-card .hero-feat-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.hero-feat-card:hover .hero-feat-img img { transform: scale(1.05); }

.hero-feat-card .hero-feat-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.hero-feat-card .hero-feat-title {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
  flex: 1;
}

.hero-feat-card .hero-feat-title a { color: var(--text-primary); transition: color 0.2s; }
.hero-feat-card:hover .hero-feat-title a { color: var(--accent-cyan); }

/* ============================================
   TOOL CATEGORIES — Image 2 style
   ============================================ */

.tool-cats-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
}

.tool-cat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 12px 18px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-cat-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tc-color, var(--accent-cyan));
  opacity: 0;
  transition: opacity 0.25s ease;
}

.tool-cat-card:hover {
  border-color: color-mix(in srgb, var(--tc-color) 40%, transparent);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tc-color) 15%, transparent);
}

.tool-cat-card:hover::before { opacity: 1; }

.tool-cat-icon {
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--tc-color) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc-color) 20%, transparent);
  margin-bottom: 2px;
  transition: var(--transition);
}

.tool-cat-card:hover .tool-cat-icon {
  background: color-mix(in srgb, var(--tc-color) 20%, transparent);
}

.tool-cat-name {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.tool-cat-count {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Responsive hero split */
@media (max-width: 1100px) {
  .tool-cats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .hero-split-inner { grid-template-columns: 1fr; gap: 36px; }
  .hero-split-right { max-width: 600px; }
  .hero-split-left h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  .tool-cats-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .hero-feat-small-row { grid-template-columns: 1fr 1fr; }
  .hero-split { padding: 48px 0 40px; }
}

@media (max-width: 540px) {
  .tool-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-feat-small-row { grid-template-columns: 1fr; }
  .hero-split-inner { padding: 0 16px; }
}

/* === HERO FEATURED CARDS — kompaktnije === */
.hero-feat-card--big .hero-feat-img { aspect-ratio: 16/7; }
.hero-feat-card .hero-feat-img      { aspect-ratio: 16/7; }

.hero-feat-card--big .hero-feat-body { padding: 12px 14px 14px; }
.hero-feat-card--big .hero-feat-title { font-size: 0.92rem; margin-bottom: 4px; }
.hero-feat-excerpt { -webkit-line-clamp: 1; margin-bottom: 4px; }

.hero-feat-card .hero-feat-body { padding: 9px 11px 11px; }
.hero-feat-card .hero-feat-title { font-size: 0.78rem; }

.hero-feat-small-row { gap: 10px; }
.hero-split-right { gap: 10px; }

/* ============================================
   AMBIENT BACKGROUND GRADIENTS
   ============================================ */

body {
  background-color: var(--bg-primary);
  background-image:
    radial-gradient(ellipse 80% 50% at 10% 0%,   rgba(99,60,180,0.13)  0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 10%,  rgba(0,100,200,0.10)  0%, transparent 55%),
    radial-gradient(ellipse 50% 60% at 80% 80%,  rgba(80,40,160,0.10)  0%, transparent 60%),
    radial-gradient(ellipse 40% 30% at 20% 90%,  rgba(0,180,255,0.06)  0%, transparent 55%);
  background-attachment: fixed;
}

/* Subtle per-section glow dividers */
.home-section { position: relative; }

.home-section:nth-child(odd)::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99,60,180,0.25), rgba(0,180,255,0.2), transparent);
}

/* Hero gets a stronger left-side purple bloom */
.hero-split-bg {
  background-image:
    radial-gradient(ellipse 60% 90% at 0% 50%,   rgba(99,60,180,0.14) 0%, transparent 65%),
    radial-gradient(ellipse 50% 60% at 100% 20%,  rgba(0,120,255,0.09) 0%, transparent 60%),
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
}

/* Card hover — faint purple glow instead of only cyan */
.post-card:hover,
.hero-feat-card--big:hover,
.hero-feat-card:hover {
  box-shadow: 0 8px 32px rgba(99,60,180,0.18), 0 2px 12px rgba(0,212,255,0.08);
}

.tool-cat-card:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--tc-color) 15%, rgba(99,60,180,0.15));
}

/* ============================================
   AMBIENT GRADIENTS — POJACANO
   ============================================ */

html {
  background: var(--bg-primary);
}

body {
  background-image:
    radial-gradient(ellipse 70% 55% at 0% 0%,    rgba(120,60,220,0.22) 0%, transparent 55%),
    radial-gradient(ellipse 55% 45% at 100% 5%,  rgba(0,100,220,0.18)  0%, transparent 50%),
    radial-gradient(ellipse 50% 50% at 85% 85%,  rgba(100,40,200,0.16) 0%, transparent 55%),
    radial-gradient(ellipse 40% 35% at 15% 95%,  rgba(0,160,255,0.12)  0%, transparent 50%);
  background-attachment: fixed;
}

/* === SIDEBAR SCROLL FIX === */
/* Sidebar skroluje sa stranicom, ali ostaje u viewportu dok ima prostora */
.post-sidebar {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;
  padding-top: 48px;
  /* Poravnanje sa vrhom posta */
  align-self: start;
}

.post-sidebar::-webkit-scrollbar { display: none; }

/* Sidebar se ne lepi ako je kraći od viewporta */
@media (max-width: 1024px) {
  .post-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
  }
}

/* ============================================
   AI TOOLS PAGE
   ============================================ */

.tools-page-hero {
  position: relative;
  padding: 72px 24px 56px;
  text-align: center;
  overflow: hidden;
  background: var(--gradient-hero);
}

.tools-page-hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 60% 70% at 20% 50%, rgba(99,60,180,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 80% 30%, rgba(0,120,255,0.10) 0%, transparent 60%),
    linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: auto, auto, 52px 52px, 52px 52px;
  pointer-events: none;
}

.tools-page-hero-content {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
}

.tools-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
}

.tools-page-hero p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 28px;
}

.tools-page-stats {
  display: flex; align-items: center; justify-content: center;
  gap: 32px; flex-wrap: wrap;
}

/* Jump links */
.jump-links-bar {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.jump-link {
  font-size: 0.8rem; font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 100px;
  transition: var(--transition);
  white-space: nowrap;
}

.jump-link:hover { color: var(--accent-cyan); border-color: rgba(0,212,255,0.3); }

/* Filter buttons */
.tool-filters {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 20px 0 24px;
}

.tool-filter-btn {
  font-family: var(--font-display);
  font-size: 0.82rem; font-weight: 700;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
}

.tool-filter-btn:hover { color: var(--text-primary); border-color: var(--border-bright); }

.tool-filter-btn.active {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000; border-color: transparent;
}

/* Tools list */
.tools-page-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Tool card */
.tool-page-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: var(--transition);
  scroll-margin-top: 100px;
}

.tool-page-card:hover {
  border-color: color-mix(in srgb, var(--tc, var(--accent-cyan)) 40%, transparent);
  box-shadow: 0 6px 32px color-mix(in srgb, var(--tc, var(--accent-cyan)) 12%, transparent);
}

.tool-page-card-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--tc, #333) 6%, transparent) 0%,
    transparent 60%);
}

.tool-page-emoji {
  font-size: 2.4rem;
  width: 60px; height: 60px;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tc, var(--accent-cyan)) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc, var(--accent-cyan)) 25%, transparent);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.tool-page-name {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.tool-page-short {
  font-size: 0.88rem; color: var(--text-secondary);
  line-height: 1.5; margin-bottom: 10px;
}

.tool-page-tags {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.tool-page-pricing {
  font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.05em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 100px;
}

.tool-page-cat, .tool-page-visits, .tool-page-rating {
  font-size: 0.78rem; color: var(--text-muted);
}

.tool-page-visit-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-display); font-size: 0.85rem; font-weight: 700;
  color: #000;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  padding: 10px 20px;
  border-radius: var(--radius-md);
  white-space: nowrap;
  transition: var(--transition);
  flex-shrink: 0;
}

.tool-page-visit-btn:hover { opacity: 0.88; transform: translateY(-1px); }

.tool-page-card-body {
  padding: 20px 28px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 32px;
  align-items: start;
}

.tool-page-desc {
  font-size: 0.9rem; color: var(--text-secondary);
  line-height: 1.7; grid-column: 1 / -1;
  margin: 0;
}

.tool-page-feat-title {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 10px;
}

.tool-page-features ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 6px;
}

.tool-page-features li {
  font-size: 0.85rem; color: var(--text-secondary);
  padding-left: 18px; position: relative; line-height: 1.45;
}

.tool-page-features li::before {
  content: '→';
  position: absolute; left: 0;
  color: var(--accent-cyan); font-size: 0.75rem;
}

.tool-page-best {
  font-size: 0.85rem; color: var(--text-secondary);
  line-height: 1.6; margin: 0;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-purple);
}

.tool-page-best strong { color: var(--text-primary); }

@media (max-width: 768px) {
  .tool-page-card-header { grid-template-columns: auto 1fr; }
  .tool-page-visit-btn { grid-column: 1 / -1; justify-self: start; }
  .tool-page-card-body { grid-template-columns: 1fr; }
  .tool-page-desc { grid-column: 1; }
  .jump-links-bar { display: none; }
}

/* === HERO GRADIENT FIX === */
.hero-split {
  background:
    radial-gradient(ellipse 55% 90% at 0% 60%,  rgba(120,60,220,0.18) 0%, transparent 60%),
    radial-gradient(ellipse 45% 60% at 100% 10%, rgba(0,100,220,0.14) 0%, transparent 55%),
    var(--gradient-hero);
}

/* === SIDEBAR SCROLL — FINALNI FIX === */
.post-sidebar {
  position: sticky;
  top: 88px;
  max-height: none !important;
  overflow: visible !important;
  align-self: start;
  padding-top: 48px;
}

/* Sticky radi samo ako je RODITELJ dovoljno visok.
   post-with-sidebar mora biti align-items: start */
.post-with-sidebar {
  align-items: start !important;
}

/* === SIDEBAR — BEZ STICKY, PRIRODNI SCROLL === */
.post-sidebar {
  position: static !important;
  top: auto !important;
  max-height: none !important;
  overflow: visible !important;
  padding-top: 48px;
}
