:root {
  --radius: 0.625rem;
  --background: #0a0a0a;
  --foreground: #fafafa;
  --card: #141414;
  --card-foreground: #fafafa;
  --popover: #141414;
  --popover-foreground: #fafafa;
  --primary: #FF0000;
  --primary-foreground: #ffffff;
  --secondary: #1a1a1a;
  --secondary-foreground: #fafafa;
  --muted: #1a1a1a;
  --muted-foreground: #a1a1aa;
  --accent: #1a1a1a;
  --accent-foreground: #fafafa;
  --destructive: #FF0000;
  --border: #27272a;
  --input: #27272a;
  --ring: #FF0000;
  --chart-1: #FF0000;
  --chart-2: #f97316;
  --chart-3: #eab308;
  --chart-4: #22c55e;
  --chart-5: #a855f7;
  --sidebar: #0f0f0f;
  --sidebar-foreground: #fafafa;
  --sidebar-primary: #FF0000;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #1a1a1a;
  --sidebar-accent-foreground: #fafafa;
  --sidebar-border: #27272a;
  --sidebar-ring: #FF0000;
}

  body {
  }
  html {
    scroll-behavior: smooth;
  }
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
  background: #333;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #FF0000 0%, #f97316 50%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-text-red {
  background: linear-gradient(135deg, #FF0000 0%, #ff4444 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Marquee animation */
@keyframes marquee {
  0% {
    transform: translateX(0%);
  }
  100% {
    transform: translateX(-50%);
  }
}

.animate-marquee {
  animation: marquee 30s linear infinite;
}

.animate-marquee:hover {
  animation-play-state: paused;
}

/* Pulse glow */
@keyframes pulse-glow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(255, 0, 0, 0.6);
  }
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

.animate-pulse-glow-slow {
  animation: pulse-glow 4s ease-in-out infinite;
}

/* Gradient border animation */
@keyframes gradient-rotate {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.animate-gradient-border {
  background: linear-gradient(270deg, #FF0000, #f97316, #fbbf24, #FF0000);
  background-size: 300% 300%;
  animation: gradient-rotate 3s ease infinite;
}

/* Glow card */
.card-glow {
  transition: all 0.3s ease;
}

.card-glow:hover {
  border-color: rgba(255, 0, 0, 0.5);
  box-shadow: 0 0 30px rgba(255, 0, 0, 0.15);
  transform: translateY(-4px);
}

/* Refined section rhythm for the long-form homepage. */
.section-spacing {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

@media (min-width: 768px) {
  .section-spacing {
    padding-top: 5.5rem;
    padding-bottom: 5.5rem;
  }
}

/* Shimmer effect for loading states */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.animate-shimmer {
  background: linear-gradient(90deg, transparent 25%, rgba(255,255,255,0.05) 50%, transparent 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #FF0000, #f97316);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* Glassmorphism card base */
.glass-card {
  background: rgba(20, 20, 20, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Gradient border for cards */
.gradient-border {
  position: relative;
}
.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, #FF0000 0%, transparent 50%, #f97316 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.gradient-border:hover::before {
  opacity: 1;
}

/* Back to top button styles */
.back-to-top {
  transition: all 0.3s ease;
}
.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.4);
}

/* Floating notification animation */
@keyframes slide-in-left {
  0% { transform: translateX(-120%); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes slide-out-left {
  0% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(-120%); opacity: 0; }
}
.animate-slide-in {
  animation: slide-in-left 0.5s ease-out forwards;
}
.animate-slide-out {
  animation: slide-out-left 0.4s ease-in forwards;
}

/* Pulse dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.animate-pulse-dot {
  animation: pulse-dot 2s ease-in-out infinite;
}

/* Magnetic button effect */
.magnetic-btn {
  transition: transform 0.2s ease;
}

/* ===== BLOG POST ENHANCEMENTS - LINK VISIBILITY & DESIGN ===== */

/* Fix link visibility in blog post content */
.entry-content a:not(.wp-element-button),
.wp-block-post-content a:not(.wp-element-button) {
  color: #FF0000 !important;
  text-decoration: underline;
  text-decoration-color: rgba(255, 0, 0, 0.4);
  text-underline-offset: 3px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.entry-content a:not(.wp-element-button):hover,
.wp-block-post-content a:not(.wp-element-button):hover {
  color: #f97316 !important;
  text-decoration-color: #f97316;
  text-decoration-thickness: 2px;
}

/* Ensure links are always visible and clickable */
.entry-content a,
.wp-block-post-content a {
  pointer-events: auto !important;
  cursor: pointer !important;
  position: relative;
  z-index: 1;
}

/* Improved blog post typography */
.entry-content,
.wp-block-post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  line-height: 1.8;
  color: #e4e4e7;
}

.entry-content p,
.wp-block-post-content p {
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
}

.entry-content h2,
.wp-block-post-content h2 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin-top: 3rem;
  margin-bottom: 1.25rem;
  color: #fafafa;
  position: relative;
  padding-bottom: 0.75rem;
}

.entry-content h2::after,
.wp-block-post-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #FF0000, #f97316);
  border-radius: 2px;
}

.entry-content h3,
.wp-block-post-content h3 {
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #f4f4f5;
}

.entry-content h4,
.wp-block-post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.875rem;
  color: #e4e4e7;
}

/* Lists styling */
.entry-content ul,
.entry-content ol,
.wp-block-post-content ul,
.wp-block-post-content ol {
  margin: 1.5rem 0;
  padding-left: 1.75rem;
  color: #d4d4d8;
}

.entry-content li,
.wp-block-post-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.entry-content ul li,
.wp-block-post-content ul li {
  list-style-type: disc;
}

.entry-content ol li,
.wp-block-post-content ol li {
  list-style-type: decimal;
}

/* Strong/bold text */
.entry-content strong,
.wp-block-post-content strong {
  font-weight: 700;
  color: #fafafa;
}

/* Code blocks */
.entry-content code,
.wp-block-post-content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 0.9375rem;
  color: #fbbf24;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Blockquotes */
.entry-content blockquote,
.wp-block-post-content blockquote {
  margin: 2rem 0;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #FF0000;
  background: rgba(255, 0, 0, 0.05);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: #d4d4d8;
}

/* Images */
.entry-content img,
.wp-block-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Post meta information */
.wp-block-post-author-name,
.wp-block-post-date,
.wp-block-post-terms {
  font-size: 0.9375rem;
  color: #a1a1aa;
}

.wp-block-post-author-name a,
.wp-block-post-date a,
.wp-block-post-terms a {
  color: #a1a1aa !important;
  text-decoration: none !important;
  transition: color 0.2s ease;
}

.wp-block-post-author-name a:hover,
.wp-block-post-date a:hover,
.wp-block-post-terms a:hover {
  color: #FF0000 !important;
}

/* Post navigation links */
.wp-block-post-navigation-link {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.wp-block-post-navigation-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 0, 0, 0.3);
  transform: translateY(-2px);
}

.wp-block-post-navigation-link a {
  color: #fafafa !important;
  text-decoration: none !important;
  font-weight: 500;
}

.wp-block-post-navigation-link a:hover {
  color: #FF0000 !important;
}

/* Related posts section */
.wp-block-post-template {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.wp-block-post-template .wp-block-post-title a {
  color: #fafafa !important;
  transition: color 0.2s ease;
}

.wp-block-post-template .wp-block-post-title a:hover {
  color: #FF0000 !important;
}

/* First paragraph enhancement (lead paragraph) */
.entry-content > p:first-of-type,
.wp-block-post-content > p:first-of-type {
  font-size: 1.1875rem;
  line-height: 1.75;
  color: #f4f4f5;
  font-weight: 400;
}

/* Horizontal rule */
.entry-content hr,
.wp-block-post-content hr {
  margin: 3rem 0;
  border: none;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255, 255, 255, 0.1) 20%,
    rgba(255, 255, 255, 0.1) 80%,
    transparent
  );
}

/* Responsive improvements */
@media (max-width: 768px) {
  .entry-content,
  .wp-block-post-content {
    padding: 1.5rem 1rem;
  }
  
  .entry-content h2,
  .wp-block-post-content h2 {
    margin-top: 2rem;
  }
  
  .entry-content > p:first-of-type,
  .wp-block-post-content > p:first-of-type {
    font-size: 1.0625rem;
  }
}

/* Focus visible for accessibility */
.entry-content a:focus-visible,
.wp-block-post-content a:focus-visible {
  outline: 2px solid #FF0000;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Selection color */
.entry-content ::selection,
.wp-block-post-content ::selection {
  background: rgba(255, 0, 0, 0.2);
  color: #fafafa;
}


/* ===== FIX: Blog text visibility on dark background ===== */
body.single-post,
body.blog,
body.archive,
body.search-results {
  color: #e4e4e7 !important;
}

.single-post .wp-block-post-title,
.blog .wp-block-post-title,
.archive .wp-block-post-title {
  color: #fafafa !important;
}

.single-post .wp-block-post-author-name,
.single-post .wp-block-post-date,
.single-post .wp-block-post-terms,
.blog .wp-block-post-author-name,
.blog .wp-block-post-date,
.blog .wp-block-post-terms {
  color: #a1a1aa !important;
}

.single-post .wp-site-blocks,
.blog .wp-site-blocks,
.archive .wp-site-blocks {
  color: #e4e4e7;
}

.single-post .wp-block-post-navigation-link a {
  color: #fafafa !important;
}

.single-post .wp-block-post-excerpt,
.blog .wp-block-post-excerpt,
.archive .wp-block-post-excerpt {
  color: #d4d4d8 !important;
}

/* ===== FIX: Blog background & container ===== */
body.single-post,
body.blog,
body.archive,
body.search-results,
body.error404 {
  background-color: #0a0a0a !important;
}

/* Ensure the main content area has dark background */
.single-post .wp-site-blocks,
.blog .wp-site-blocks,
.archive .wp-site-blocks,
.search-results .wp-site-blocks {
  background-color: #0a0a0a !important;
}

/* Fix the narrow content width on single posts */
.single-post .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
  max-width: 860px !important;
}

/* Blog archive title */
.blog .wp-block-query-title,
.archive .wp-block-query-title,
.search-results .wp-block-query-title {
  color: #fafafa !important;
}

/* Blog page title / description */
.blog .wp-block-group h1,
.blog .wp-block-group h2,
.archive .wp-block-group h1,
.archive .wp-block-group h2 {
  color: #fafafa !important;
}

/* Blog archive post excerpts */
.blog .wp-block-post-excerpt__excerpt,
.archive .wp-block-post-excerpt__excerpt {
  color: #d4d4d8 !important;
}

/* Blog archive post meta */
.blog .wp-block-post-date,
.archive .wp-block-post-date {
  color: #a1a1aa !important;
}

/* Blog archive featured image */
.blog .wp-block-post-featured-image img,
.archive .wp-block-post-featured-image img {
  border-radius: 8px;
}

/* Pagination */
.blog .wp-block-query-pagination a,
.archive .wp-block-query-pagination a,
.single-post .wp-block-query-pagination a {
  color: #fafafa !important;
}

.blog .wp-block-query-pagination .page-numbers,
.archive .wp-block-query-pagination .page-numbers {
  color: #a1a1aa !important;
}

.blog .wp-block-query-pagination .page-numbers.current,
.archive .wp-block-query-pagination .page-numbers.current {
  color: #FF0000 !important;
}

/* Tables in blog posts */
.wp-block-post-content table,
.entry-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 2rem 0;
  color: #e4e4e7;
}

.wp-block-post-content table th,
.entry-content table th {
  background: rgba(255, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #fafafa;
  text-align: left;
}

.wp-block-post-content table td,
.entry-content table td {
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.wp-block-post-content table tr:nth-child(even) td,
.entry-content table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.04);
}

/* Comments section */
.single-post .wp-block-post-comments {
  color: #e4e4e7;
}

.single-post .wp-block-post-comments .comment-author cite {
  color: #fafafa;
}

.single-post .wp-block-post-comments .comment-meta {
  color: #a1a1aa;
}

.single-post .wp-block-post-comments .comment-body {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.single-post .comment-reply-title {
  color: #fafafa;
}

.single-post .comment-form label {
  color: #d4d4d8;
}

.single-post .comment-form input,
.single-post .comment-form textarea {
  background: rgba(255, 255, 255, 0.05) !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  color: #fafafa !important;
  border-radius: 6px !important;
}

.single-post .comment-form input:focus,
.single-post .comment-form textarea:focus {
  border-color: #FF0000 !important;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.15) !important;
}

.single-post .comment-form .submit {
  background: #FF0000 !important;
  color: #ffffff !important;
  border: none !important;
  padding: 0.75rem 2rem !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.single-post .comment-form .submit:hover {
  background: #e60000 !important;
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.3) !important;
}

/* Sidebar / widget area on blogs */
.single-post .wp-block-column.is-layout-flow,
.blog .wp-block-column.is-layout-flow {
  color: #e4e4e7;
}

/* Ensure footer is dark too */
.single-post footer.wp-block-template-part,
.blog footer.wp-block-template-part,
.archive footer.wp-block-template-part {
  background-color: #0a0a0a !important;
}

/* Remove any white backgrounds that might leak */
.single-post *,
.blog *,
.archive * {
  /* Don't force all elements, just ensure dark background propagates */
}

/* Separator / divider in blog */
.single-post .wp-block-separator,
.blog .wp-block-separator {
  color: rgba(255, 255, 255, 0.1) !important;
}

/* Homepage contrast and brand consistency fix */
.gradient-text,
.gradient-text-red {
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
}

body.home #top h1,
body.home #top h2,
body.home #top h3 {
  color: #f8fafc;
}

body.home #top .section-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.10);
  color: #fca5a5 !important;
  font-size: 0.75rem !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  padding: 0.42rem 0.78rem;
  text-transform: uppercase;
  -webkit-text-fill-color: currentColor !important;
}

body.home #top .section-badge .gradient-text {
  -webkit-text-fill-color: transparent !important;
}

body.home #top [class*="text-zinc-600"] {
  color: #a1a1aa;
}

body.home #top [class*="text-zinc-700"] {
  color: #71717a;
}
