/* ========================================
   BitcoinLive24 Custom Design System v2.0
   CRT/Hacker Style + Liquid Glass Effects
   ======================================== */

/* ========================================
   1. VARIABLES & COLORS
   ======================================== */

:root {
  /* Bitcoin Brand Colors */
  --btc-orange: #F7931A;
  --btc-gold: #FFD700;
  --btc-green: #4ADE80;
  --btc-blue: #60A5FA;
  --btc-purple: #A78BFA;
  --btc-cyan: #22D3EE;
  --btc-teal: #2DD4BF;

  /* Backgrounds */
  --bg-black: #000000;
  --bg-dark-green: #050F0A;

  /* Text with opacity */
  --text-primary: rgba(255, 255, 255, 1);
  --text-secondary: rgba(255, 255, 255, 0.6);
  --text-tertiary: rgba(255, 255, 255, 0.5);
  --text-disabled: rgba(255, 255, 255, 0.4);
  --text-muted: rgba(255, 255, 255, 0.3);

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* ========================================
   2. CRT/HACKER BACKGROUND
   ======================================== */

/* Remove old backgrounds */
.cyber-grid,
.matrix-rain {
  display: none !important;
}

/* New background container */
.site-background {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background-color: #000000;
  z-index: -1;
}

/* Layer 1: Gradiente base scuro con tinta verde */
.bg-layer-gradient {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(5, 15, 10, 1) 0%, rgba(0, 0, 0, 1) 70%);
}

/* Layer 2: Griglia quadrata arancione */
.bg-layer-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image:
    linear-gradient(90deg, rgba(247, 147, 26, 0.5) 1px, transparent 1px),
    linear-gradient(0deg, rgba(247, 147, 26, 0.3) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Layer 3: Scan Lines (effetto CRT) */
.bg-layer-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.3) 2px,
    rgba(0, 0, 0, 0.3) 4px
  );
  background-size: 100% 4px;
  animation: scanlines-move 0.1s linear infinite;
}

@keyframes scanlines-move {
  0% { background-position: 0 0; }
  100% { background-position: 0 4px; }
}

/* Layer 4: Flicker CRT */
.bg-layer-flicker {
  position: absolute;
  inset: 0;
  background: transparent;
  animation: crt-flicker 5s linear infinite;
}

@keyframes crt-flicker {
  0%, 100% { opacity: 1; }
  92% { opacity: 1; }
  93% { opacity: 0.8; }
  94% { opacity: 1; }
  97% { opacity: 0.9; }
  98% { opacity: 1; }
}

/* Layer 5: Glow centrale arancione */
.bg-layer-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse at center, rgba(247, 147, 26, 0.1) 0%, transparent 60%);
  filter: blur(80px);
}

/* Layer 6: Linea di scansione verticale animata */
.bg-layer-scanline-vertical {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent 0%, rgba(247, 147, 26, 0.8) 50%, transparent 100%);
  box-shadow: 0 0 20px rgba(247, 147, 26, 0.5), 0 0 40px rgba(247, 147, 26, 0.3);
  animation: scan-line-horizontal 8s linear infinite;
}

@keyframes scan-line-horizontal {
  0% { left: -5%; opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { left: 105%; opacity: 0; }
}

/* Layer 7: Noise texture */
.bg-layer-noise {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  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)'/%3E%3C/svg%3E");
}

/* Layer 8: Corner brackets (effetto terminale) */
.corner-bracket {
  position: absolute;
  width: 64px;
  height: 64px;
  border-color: rgba(247, 147, 26, 0.3);
  border-style: solid;
  border-width: 0;
}

.corner-bracket.top-left {
  top: 32px;
  left: 32px;
  border-left-width: 2px;
  border-top-width: 2px;
}

.corner-bracket.top-right {
  top: 32px;
  right: 32px;
  border-right-width: 2px;
  border-top-width: 2px;
}

.corner-bracket.bottom-left {
  bottom: 32px;
  left: 32px;
  border-left-width: 2px;
  border-bottom-width: 2px;
}

.corner-bracket.bottom-right {
  bottom: 32px;
  right: 32px;
  border-right-width: 2px;
  border-bottom-width: 2px;
}

/* Mobile: disable heavy animations */
@media (max-width: 768px) {
  .bg-layer-scanlines,
  .bg-layer-scanline-vertical,
  .bg-layer-flicker {
    display: none;
  }
}

/* ========================================
   3. LIQUID GLASS EFFECTS
   ======================================== */

/* Glass Base - Per header, badge */
.liquid-glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Glass Card - Per card articoli */
.liquid-glass-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.3s ease;
}

.liquid-glass-card:hover {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow:
    0 8px 40px rgba(247, 147, 26, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* Glass Button - Pulsante CTA principale arancione */
.liquid-glass-button {
  background: linear-gradient(
    135deg,
    rgba(247, 147, 26, 0.9) 0%,
    rgba(247, 147, 26, 0.7) 100%
  );
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 4px 16px rgba(247, 147, 26, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
  color: #000000;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
}

.liquid-glass-button:hover {
  background: linear-gradient(
    135deg,
    rgba(247, 147, 26, 1) 0%,
    rgba(255, 200, 50, 0.9) 100%
  );
  box-shadow:
    0 8px 32px rgba(247, 147, 26, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transform: translateY(-1px);
  color: #000000;
}

/* Glass Button Secondary - Coming soon */
.liquid-glass-button-secondary {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  color: rgba(255, 255, 255, 0.5);
  font-weight: 600;
  cursor: not-allowed;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  text-decoration: none;
}

/* Fallback per browser che non supportano backdrop-filter */
@supports not (backdrop-filter: blur(20px)) {
  .liquid-glass {
    background: rgba(0, 0, 0, 0.8);
  }

  .liquid-glass-card {
    background: rgba(30, 30, 30, 0.95);
  }
}

/* ========================================
   4. HEADER NUOVO DESIGN
   ======================================== */

.site-header {
  position: relative;
  z-index: 50;
  padding: 16px;
}

.header-nav {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 16px;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1152px;
  margin: 0 auto;
}

/* Logo */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.header-logo img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.header-logo-text {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF;
}

.header-logo-text span {
  color: #F7931A;
}

/* Header Buttons */
.header-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-btn {
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.header-btn svg {
  width: 16px;
  height: 16px;
}

/* Mobile responsive header */
@media (max-width: 768px) {
  .header-buttons {
    flex-direction: row;
    gap: 8px;
  }

  .header-btn {
    font-size: 0.75rem;
    padding: 10px;
    min-width: auto;
  }

  /* Hide logo text on mobile, keep only icon */
  .header-logo-text {
    display: none;
  }

  /* Hide button text on mobile, keep only icons */
  .header-btn span {
    display: none;
  }

  .header-btn svg {
    width: 20px;
    height: 20px;
  }
}

/* ========================================
   5. ARTICLE CARDS LIQUID GLASS
   ======================================== */

.article-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.article-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow: 0 8px 40px rgba(247, 147, 26, 0.15);
  transform: translateY(-4px);
}

/* Categoria badge con liquid glass */
.article-card-category,
.category-badge {
  display: inline-block;
  padding: 4px 12px;
  background: rgba(247, 147, 26, 0.2);
  color: #F7931A;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   6. FOOTER NUEVO DESIGN
   ======================================== */

.site-footer {
  position: relative;
  padding: 48px 0;
  background: #000000;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
  max-width: 1152px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* Footer Logo */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.footer-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.footer-logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: #FFFFFF;
}

.footer-logo-text span {
  color: #F7931A;
}

/* Footer Links */
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.footer-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #F7931A;
}

/* Social Icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 16px;
}

.footer-social a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s ease;
}

.footer-social a:hover {
  color: #F7931A;
}

.footer-social svg {
  width: 20px;
  height: 20px;
}

/* Copyright */
.footer-copyright {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.875rem;
}

/* ========================================
   7. UTILITIES & HELPERS
   ======================================== */

/* Text gradient Bitcoin */
.text-gradient-bitcoin {
  background: linear-gradient(to right, #F7931A, #FFD700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Bitcoin Orange text */
.text-bitcoin {
  color: #F7931A;
}

/* Live badge */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-badge-dot {
  width: 8px;
  height: 8px;
  background: #4ADE80;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

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

.live-badge-text {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
}

/* Icon boxes for features */
.icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.icon-box svg {
  width: 28px;
  height: 28px;
  color: #FFFFFF;
}

.icon-box-orange { background: rgba(247, 147, 26, 0.2); }
.icon-box-orange svg { color: #F7931A; }

.icon-box-blue { background: rgba(59, 130, 246, 0.2); }
.icon-box-blue svg { color: #60A5FA; }

.icon-box-green { background: rgba(34, 197, 94, 0.2); }
.icon-box-green svg { color: #4ADE80; }

.icon-box-purple { background: rgba(168, 85, 247, 0.2); }
.icon-box-purple svg { color: #A78BFA; }

/* ========================================
   8. APP CTA BANNER
   ======================================== */

.app-cta-banner {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.9), rgba(255, 200, 50, 0.8));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  margin: 20px 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px rgba(247, 147, 26, 0.4);
}

.app-cta-banner p {
  color: #FFFFFF;
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 1rem;
}

/* Fix postTitle dentro app-cta-banner */
.app-cta-banner .postTitle {
  color: #FFFFFF !important;
}

/* ========================================
   SPRINT 2: HOMEPAGE SEO ENHANCEMENTS
   ======================================== */

/* Hero Section Hover Effects */
.hero-home .hero-cta a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(247, 147, 26, 0.5);
}

.hero-home .hero-cta a:last-child:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--btc-orange);
}

/* Featured Categories Showcase */
.cat-showcase-card:hover {
  transform: translateY(-4px);
  border-color: var(--btc-orange) !important;
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.3);
  background: rgba(255, 255, 255, 0.08) !important;
}

/* ========================================
   SVG ICONS HOMEPAGE
   ======================================== */

/* Hero Icons */
.hero-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
}

/* Category Showcase Icons */
.category-showcase-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* Section Icons (In Evidenza, Inizia da Qui) */
.section-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* Card Icons (Highlight cards) */
.card-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* Placeholder Icon */
.placeholder-icon {
  width: 100%;
  height: 100%;
  display: block;
}

/* ========================================
   SPRINT 3: IN EVIDENZA OGGI & VOICE SEARCH
   ======================================== */

/* In Evidenza Oggi - Hover Effects */
.highlight-card {
  transition: all 0.3s ease;
}

.highlight-card:hover {
  transform: translateY(-4px);
  border-color: rgba(247, 147, 26, 0.4) !important;
  box-shadow: 0 8px 20px rgba(247, 147, 26, 0.2);
  background: rgba(255, 255, 255, 0.08) !important;
}

.highlight-card h3 {
  transition: color 0.3s ease;
}

.highlight-card:hover h3 {
  color: var(--btc-orange) !important;
}

/* Highlight Grid Responsive */
@media (max-width: 992px) {
  .highlight-grid {
    grid-template-columns: 1fr !important;
  }

  .today-highlights h2 {
    font-size: 1.75rem !important;
  }

  .highlight-card {
    padding: 1.25rem !important;
  }

  .highlight-card h3 {
    font-size: 1.1rem !important;
  }
}

/* iPhone Mockup Styling */
.iphone-mockup {
  position: relative;
  width: 280px;
  height: 570px;
  background: linear-gradient(145deg, #1a1a1a, #0a0a0a);
  border-radius: 42px;
  padding: 12px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.iphone-mockup:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.15),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Dynamic Island (iPhone 14/15 Notch) */
.iphone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 28px;
  background: #000000;
  border-radius: 20px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* iPhone Screen */
.iphone-screen {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
  display: block;
}

/* Deprecato - backup per compatibilità */
.start-image img:not(.iphone-screen) {
  transition: transform 0.3s ease;
}

/* Sezione Inizia da Qui - Responsive */
@media (max-width: 768px) {
  .start-here-section > div {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .start-image {
    padding: 0 !important;
  }

  /* iPhone Mockup Mobile */
  .iphone-mockup {
    width: 220px;
    height: 450px;
  }

  .iphone-notch {
    width: 80px;
    height: 24px;
    top: 14px;
  }

  .hero-home {
    padding: 1.5rem 1rem !important;
  }

  .hero-home h1 {
    font-size: 1.75rem !important;
  }

  .hero-subtitle {
    font-size: 1rem !important;
  }

  .hero-stats {
    gap: 1.5rem !important;
  }

  .hero-stats .stat-item > div:first-child {
    font-size: 1.5rem !important;
  }

  .hero-cta {
    flex-direction: column !important;
    width: 100%;
  }

  .hero-cta a {
    width: 100%;
    justify-content: center !important;
  }

  .categories-showcase {
    grid-template-columns: 1fr !important;
  }

  .featured-categories h2 {
    font-size: 1.5rem !important;
  }

  .start-here-section {
    padding: 2rem 1.5rem !important;
  }

  .start-text h2 {
    font-size: 1.5rem !important;
  }

  .start-text p {
    font-size: 1rem !important;
  }
}

.app-cta-banner a {
  background: #000000;
  color: #FFFFFF;
  padding: 12px 24px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.3s ease;
}

.app-cta-banner a:hover {
  background: #222222;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ========================================
   9. PERFORMANCE OPTIMIZATIONS
   ======================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Force hardware acceleration */
.liquid-glass,
.liquid-glass-card,
.liquid-glass-button,
.article-card {
  transform: translateZ(0);
  will-change: transform;
}

/* ========================================
   10. BREADCRUMB NAVIGATION
   ======================================== */

.breadcrumb {
  padding: 16px 0;
  margin-bottom: 24px;
}

.breadcrumb ol {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
}

.breadcrumb li:not(:last-child)::after {
  content: '›';
  color: rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: #F7931A;
}

.breadcrumb li:last-child span {
  color: #FFFFFF;
}

/* ========================================
   11. FAQ SECTION
   ======================================== */

.faq-section {
  margin: 40px 0;
  padding: 32px;
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.faq-section h2 {
  color: #FFFFFF;
  font-size: 1.75rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #F7931A;
}

.faq-item {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.faq-question {
  color: #F7931A;
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.faq-answer {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1rem;
  line-height: 1.6;
}

.faq-answer p {
  margin-bottom: 12px;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}

/* ========================================
   12. RELATED POSTS
   ======================================== */

.related-posts {
  margin-top: 48px;
  padding-top: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.related-posts h3 {
  color: #FFFFFF;
  font-size: 1.5rem;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid #F7931A;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 24px;
}

@media (min-width: 640px) {
  .related-posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .related-posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.related-post-card {
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.related-post-card:hover {
  border-color: rgba(247, 147, 26, 0.3);
  box-shadow: 0 8px 24px rgba(247, 147, 26, 0.15);
  transform: translateY(-2px);
}

.related-post-image {
  display: block;
  aspect-ratio: 16/9;
  overflow: hidden;
}

.related-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.related-post-card:hover .related-post-image img {
  transform: scale(1.05);
}

.related-post-content {
  padding: 16px;
}

.related-post-title {
  margin: 0 0 8px 0;
  font-size: 1rem;
  line-height: 1.4;
}

.related-post-title a {
  color: #FFFFFF;
  text-decoration: none;
  transition: color 0.3s ease;
}

.related-post-title a:hover {
  color: #F7931A;
}

.related-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.75rem;
}

/* ========================================
   13. READING TIME BADGE
   ======================================== */

.reading-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  background: rgba(247, 147, 26, 0.2);
  color: #F7931A;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
}

.reading-time svg {
  width: 14px;
  height: 14px;
}

/* ========================================
   BREADCRUMB VISIVO
   ======================================== */

.breadcrumb-visual {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 0;
  margin-bottom: 2rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.breadcrumb-visual a {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumb-visual a:hover {
  color: var(--btc-orange);
}

.breadcrumb-visual .separator {
  color: var(--text-muted);
  user-select: none;
}

.breadcrumb-visual .current {
  color: var(--text-primary);
  font-weight: 500;
}

@media (max-width: 768px) {
  .breadcrumb-visual {
    font-size: 0.8rem;
  }
}


/* ========================================
   CATEGORY FAQ SECTION
   ======================================== */

.category-faq {
  background: linear-gradient(135deg, rgba(247,147,26,0.05), rgba(255,215,0,0.02));
  border: 1px solid rgba(247, 147, 26, 0.2);
  border-radius: 1rem;
  padding: 2rem;
  margin-top: 3rem;
}

.category-faq h3 {
  color: var(--btc-orange);
  font-size: 1.5rem;
  margin: 0 0 1.5rem;
  font-weight: 700;
}

/* FAQ Accordion Items */
.faq-item-accordion {
  margin-bottom: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.faq-item-accordion:last-child {
  margin-bottom: 0;
}

.faq-item-accordion:hover {
  border-color: rgba(247, 147, 26, 0.4);
}

.faq-item-accordion.active {
  border-color: var(--btc-orange);
}

/* FAQ Question Button */
.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  transition: all 0.3s ease;
}

.faq-question:hover {
  color: var(--btc-orange);
}

.faq-question span {
  flex: 1;
  padding-right: 1rem;
}

/* FAQ Icon */
.faq-icon {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.3s ease, color 0.3s ease;
}

.faq-item-accordion.active .faq-icon {
  transform: rotate(180deg);
  color: var(--btc-orange);
}

/* FAQ Answer */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-answer p {
  padding: 0 1.25rem 1.25rem;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .category-faq {
    padding: 1.5rem;
    margin-top: 2rem;
  }

  .category-faq h3 {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .faq-question {
    padding: 1rem;
    font-size: 1rem;
  }

  .faq-answer p {
    padding: 0 1rem 1rem;
    font-size: 0.9375rem;
  }
}


/* ========================================
   RELATED CATEGORIES WIDGET
   ======================================== */

.related-categories {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.related-cat-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
}

.related-cat-card:hover {
  background: linear-gradient(135deg, rgba(247,147,26,0.1), rgba(255,215,0,0.05));
  border-color: var(--btc-orange);
  transform: translateX(4px);
}

.related-cat-name {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
}

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

.related-cat-card:hover .related-cat-name {
  color: var(--btc-orange);
}


/* ========================================
   CATEGORY FILTERS / SORTING
   ======================================== */

.category-filters {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
}

.filter-label {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
}

.filter-select {
  padding: 0.5rem 2.5rem 0.5rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8"><path fill="%23F7931A" d="M1.5 0L6 5.5L10.5 0L12 1L6 8L0 1L1.5 0Z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 12px;
}

.filter-select:hover {
  border-color: var(--btc-orange);
}

.filter-select:focus {
  outline: none;
  border-color: var(--btc-orange);
  box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.1);
}

.filter-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--btc-orange);
  font-size: 0.875rem;
}

.spinner {
  animation: spin 1s linear infinite;
}

.spinner circle {
  stroke: var(--btc-orange);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Posts container transition */
#posts-container {
  transition: opacity 0.3s ease;
}

@media (max-width: 768px) {
  .category-filters {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }

  .filter-select {
    width: 100%;
  }
}

/* ============================================
   CATEGORY ICONS SVG
   ============================================ */

/* Base icon styles */
.category-icon {
  display: inline-block;
  vertical-align: middle;
  transition: all 0.3s ease;
}

/* Icon in category badge header */
.category-icon-badge {
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  color: var(--btc-orange);
  filter: drop-shadow(0 0 8px rgba(247, 147, 26, 0.3));
}

/* Icon in sidebar category list */
.category-icon-list {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
  color: var(--text-secondary);
  transition: color 0.3s ease, transform 0.3s ease;
  flex-shrink: 0;
}

.category-list li a:hover .category-icon-list {
  color: var(--btc-orange);
  transform: scale(1.1);
}

.category-list li.current-category .category-icon-list {
  color: var(--btc-orange);
}

/* Icon in related categories cards */
.category-icon-related {
  width: 24px;
  height: 24px;
  margin-right: 0.75rem;
  color: var(--btc-orange);
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.related-cat-card:hover .category-icon-related {
  transform: rotate(10deg) scale(1.1);
}

/* Related category card left section */
.related-cat-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Ensure category list items display icons properly */
.category-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Category badge with icon */
.category-badge {
  display: inline-flex;
  align-items: center;
}

/* Animation on hover for all icons */
.category-icon:hover {
  filter: drop-shadow(0 0 12px rgba(247, 147, 26, 0.5));
}

/* Icon colors per category (optional themed colors) */
.category-news .category-icon { color: #f7931a; }
.category-mercati .category-icon { color: #00d4aa; }
.category-analisi-tecnica .category-icon { color: #8b5cf6; }
.category-guide .category-icon { color: #3b82f6; }
.category-tecnologia .category-icon { color: #10b981; }
.category-mining .category-icon { color: #fbbf24; }
.category-regolamentazione .category-icon { color: #ef4444; }
.category-opinioni .category-icon { color: #ec4899; }
.category-impara-bitcoin .category-icon { color: #06b6d4; }
.category-wallet-bitcoin .category-icon { color: #a855f7; }
.category-comprare-bitcoin .category-icon { color: #22c55e; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .category-icon-badge {
    width: 18px;
    height: 18px;
    margin-right: 0.4rem;
  }

  .category-icon-related {
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
  }
}

/* ============================================
   COLLAPSIBLE DESCRIPTION (MOBILE)
   ============================================ */

.category-description-wrapper {
  position: relative;
}

.category-description {
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
  position: relative;
}

.category-description.collapsed {
  position: relative;
}

.category-description.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--bg-secondary));
  pointer-events: none;
}

.description-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.15), rgba(255, 215, 0, 0.1));
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  color: var(--btc-orange);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.description-toggle-btn:hover {
  background: linear-gradient(135deg, rgba(247, 147, 26, 0.25), rgba(255, 215, 0, 0.15));
  border-color: var(--btc-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(247, 147, 26, 0.2);
}

.description-toggle-btn:active {
  transform: translateY(0);
}

.toggle-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

/* Desktop: remove collapse */
@media (min-width: 769px) {
  .description-toggle-btn {
    display: none !important;
  }

  .category-description {
    max-height: none !important;
  }

  .category-description.collapsed::after {
    display: none;
  }
}

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */

/* GPU acceleration for animated elements */
.featured-card,
.article-card,
.related-cat-card,
.faq-item-accordion,
.description-toggle-btn {
  will-change: transform;
}

/* Optimize transform animations */
.featured-card:hover,
.article-card:hover,
.related-cat-card:hover {
  transform: translateY(-4px);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Content visibility for off-screen elements */
.article-card:not(:nth-child(-n+6)) {
  content-visibility: auto;
  contain-intrinsic-size: 400px;
}

/* Optimize repaints */
.category-icon,
.toggle-icon,
.faq-icon {
  transform: translateZ(0);
  will-change: transform;
}

/* Image loading optimization */
img {
  height: auto;
  max-width: 100%;
}

/* Prevent layout shift for images */
.featured-card-image,
.article-card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-card);
}

.featured-card-image img,
.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* FAQ Accordion - Dark theme fix */
.entry-content details {
    border: 1px solid rgba(247, 147, 26, 0.3) !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
    background: rgba(30, 30, 30, 0.95) !important;
    overflow: hidden;
}
.entry-content details summary {
    padding: 16px 20px !important;
    font-weight: 600 !important;
    cursor: pointer;
    list-style: none;
    color: #e0e0e0 !important;
    background: rgba(40, 40, 40, 0.95) !important;
}
.entry-content details summary:hover {
    background: rgba(50, 50, 50, 0.95) !important;
}
.entry-content details[open] summary {
    border-bottom: 1px solid rgba(247, 147, 26, 0.2);
}
.entry-content details summary span {
    color: #f7931a !important;
}
.entry-content details > div {
    padding: 0 20px 16px !important;
    color: #b0b0b0 !important;
    border-top: 1px solid rgba(247, 147, 26, 0.15) !important;
    background: transparent !important;
}
.entry-content details > div p {
    color: #b0b0b0 !important;
    margin: 12px 0 0 !important;
}
