/* Blog Premium Styles - Enterprise-Grade Design */

/* ============================================
   Premium Variables & Custom Properties
   ============================================ */
:root {
  --blog-gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
  --blog-gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --blog-gradient-blue: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
  --blog-gradient-purple: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
  --blog-gradient-dark: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);

  --blog-glass-bg: rgba(30, 41, 59, 0.7);
  --blog-glass-border: rgba(255, 255, 255, 0.1);
  --blog-glass-highlight: rgba(255, 255, 255, 0.05);

  --blog-shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --blog-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --blog-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --blog-shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

  --blog-hover-lift: translateY(-8px);
  --blog-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  background-color: #0f172a;
  color: #e2e8f0;
  overflow-x: hidden;
}

/* Glassmorphic Sticky Header/Filter Bar */
section.sticky {
  background: rgba(15, 23, 42, 0.85) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   Typography Enhancements
   ============================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: -0.02em;
}

.golden-text {
  background: var(--blog-gradient-gold);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(251, 191, 36, 0.2);
  font-weight: 800;
  animation: shine 4s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

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

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

/* Load More Button */
#loadMoreBtn {
  background: var(--blog-gradient-gold);
  color: #1a1a1a;
  border: none;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

#loadMoreBtn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

#loadMoreBtn:hover::before {
  left: 100%;
}

#loadMoreBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
}

/* ============================================
   Premium Card Styles
   ============================================ */
.blog-card {
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--blog-glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--blog-transition);
  position: relative;
  overflow: hidden;
  box-shadow: var(--blog-shadow-md);
}

.blog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.6s ease-in-out;
  z-index: 10;
  pointer-events: none;
}

.blog-card:hover::before {
  left: 100%;
}

.blog-card:hover {
  transform: var(--blog-hover-lift);
  box-shadow: var(--blog-shadow-lg), var(--blog-shadow-glow);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(30, 41, 59, 0.8);
}

.blog-card img {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.9);
}

.blog-card:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Category Badge in Card */
.blog-card .bg-yellow-500 {
  background: var(--blog-gradient-gold);
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.blog-card .bg-green-600 {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: rgba(15, 23, 42, 0.1);
  z-index: 9999;
}

.progress-bar {
  height: 100%;
  background: var(--blog-gradient-primary);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.7);
}

/* ============================================
   Hero Section Enhancements
   ============================================ */
.hero-gradient-overlay {
  background: radial-gradient(circle at 50% 50%, rgba(17, 24, 39, 0.4) 0%, rgba(17, 24, 39, 0.95) 100%);
}

.hero-gradient-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(17, 24, 39, 1) 100%);
  pointer-events: none;
}

/* ============================================
   Button Enhancements
   ============================================ */
.premium-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  z-index: 1;
}

.premium-btn-primary {
  background: var(--blog-gradient-gold);
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  border: none;
}

.premium-btn-primary:hover {
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

.premium-btn-outline {
  background: transparent;
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fbbf24;
}

.premium-btn-outline:hover {
  border-color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  box-shadow: 0 0 20px rgba(251, 191, 36, 0.2);
  transform: translateY(-2px);
}

/* ============================================
   Category Tags
   ============================================ */
.category-tag {
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #94a3b8;
  transition: all 0.3s ease;
}

.category-tag:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  transform: translateY(-2px);
}

.category-tag.active {
  background: var(--blog-gradient-gold);
  color: #1a1a1a;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ============================================
   Search Input
   ============================================ */
#searchInput {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

#searchInput:focus {
  background: rgba(15, 23, 42, 0.9);
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.2);
}

/* ============================================
   Share Dropdown
   ============================================ */
.share-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  padding: 0.5rem;
  min-width: 160px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 50;
}

.share-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.share-option {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  color: #cbd5e1;
  border-radius: 0.375rem;
  transition: all 0.2s;
  font-size: 0.875rem;
  gap: 0.5rem;
}

.share-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.newsletter-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.newsletter-card::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

#newsletterForm button[type="submit"] {
  background: var(--blog-gradient-gold);
  color: #1a1a1a;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
  border: none;
  transition: all 0.3s ease;
}

#newsletterForm button[type="submit"]:hover {
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-100 {
  animation-delay: 0.1s;
}

.delay-200 {
  animation-delay: 0.2s;
}

.delay-300 {
  animation-delay: 0.3s;
}

.delay-400 {
  animation-delay: 0.4s;
}

/* ============================================
   Resource Cards (Whitepapers, etc.)
   ============================================ */
.bg-gradient-to-br.from-gray-800 {
  background: rgba(30, 41, 59, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--blog-transition);
}

.bg-gradient-to-br.from-gray-800:hover {
  background: rgba(30, 41, 59, 0.8);
  transform: translateY(-5px);
  box-shadow: var(--blog-shadow-lg);
  border-color: rgba(255, 255, 255, 0.2);
}

/* ============================================
   Mobile Optimizations
   ============================================ */
@media (max-width: 768px) {
  .blog-card:hover {
    transform: translateY(-4px);
  }

  :root {
    --blog-hover-lift: translateY(-4px);
  }

  h1 {
    font-size: 2.5rem !important;
  }
}

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #0f172a;
}

::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: #475569;
}