/* Complete Blog Enhancement CSS */
/* Save as static/css/enhanced.css or static/assets/css/enhanced.css */

/* ===== RESET PROSE DEFAULTS ===== */
.prose {
  max-width: none !important;
  color: #374151 !important;
  line-height: 1.75 !important;
}

/* ===== HEADER STYLING WITH SEIRI BRANDING ===== */

/* H1 - Main article title (but this is in header, so style in-content H1s) */
.prose h1 {
  font-size: 2.25rem !important;
  font-weight: 800 !important;
  color: #1f2937 !important;
  margin-top: 3rem !important;
  margin-bottom: 2rem !important;
  line-height: 1.2 !important;
  padding-bottom: 1rem !important;
  border-bottom: 3px solid #2563eb !important;
  position: relative !important;
}

.prose h1:first-child {
  margin-top: 0 !important;
}

/* H2 - Major sections with Seiri blue accent */
.prose h2 {
  font-size: 1.875rem !important;
  font-weight: 700 !important;
  color: #1f2937 !important;
  margin-top: 3rem !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.3 !important;
  padding-left: 1rem !important;
  border-left: 4px solid #2563eb !important;
  position: relative !important;
}

/* H3 - Subsections */
.prose h3 {
  font-size: 1.5rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-top: 2.5rem !important;
  margin-bottom: 1.25rem !important;
  line-height: 1.4 !important;
}

/* H4, H5, H6 */
.prose h4 {
  font-size: 1.25rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-top: 2rem !important;
  margin-bottom: 1rem !important;
}

.prose h5,
.prose h6 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
  color: #4b5563 !important;
  margin-top: 1.75rem !important;
  margin-bottom: 0.75rem !important;
}

/* ===== IMAGE STYLING ===== */

/* Main image styling with proper spacing */
.prose img {
  margin: 3rem 0 !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  border: 1px solid #e5e7eb !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  max-width: 100% !important;
  height: auto !important;
  display: block !important;
}

.prose img:hover {
  transform: scale(1.02) !important;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 10px 20px -5px rgba(0, 0, 0, 0.1) !important;
}

/* Image captions (em elements after images) */
.prose img + em {
  display: block !important;
  text-align: center !important;
  font-style: italic !important;
  color: #6b7280 !important;
  font-size: 0.875rem !important;
  margin-top: -2.5rem !important;
  margin-bottom: 2rem !important;
  line-height: 1.5 !important;
  padding: 0 1rem !important;
}

/* Ensure images after headers have proper spacing */
.prose h1 + p img,
.prose h2 + p img,
.prose h3 + p img {
  margin-top: 2rem !important;
}

/* ===== PARAGRAPH SPACING ===== */

.prose p {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  line-height: 1.75 !important;
  color: #374151 !important;
}

.prose p:first-child {
  margin-top: 0 !important;
}

/* ===== LIST STYLING ===== */

.prose ul,
.prose ol {
  margin-top: 1.5rem !important;
  margin-bottom: 1.5rem !important;
  padding-left: 1.5rem !important;
}

.prose li {
  margin-top: 0.5rem !important;
  margin-bottom: 0.5rem !important;
  line-height: 1.6 !important;
  color: #374151 !important;
}

.prose li > p {
  margin-top: 0.75rem !important;
  margin-bottom: 0.75rem !important;
}

/* List bullets and numbers styling */
.prose ul > li {
  position: relative !important;
}

.prose ul > li::marker {
  color: #2563eb !important;
}

.prose ol > li::marker {
  color: #2563eb !important;
  font-weight: 600 !important;
}

/* ===== BLOCKQUOTES ===== */

.prose blockquote {
  border-left: 4px solid #2563eb !important;
  background-color: #f8fafc !important;
  padding: 1.5rem 2rem !important;
  margin: 2.5rem 0 !important;
  border-radius: 0 0.5rem 0.5rem 0 !important;
  font-style: italic !important;
  color: #374151 !important;
  position: relative !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1) !important;
}

.prose blockquote::before {
  content: '"' !important;
  font-size: 4rem !important;
  color: #2563eb !important;
  position: absolute !important;
  top: -0.5rem !important;
  left: 1rem !important;
  font-family: Georgia, serif !important;
  opacity: 0.3 !important;
  line-height: 1 !important;
}

.prose blockquote p {
  margin: 0 !important;
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
  color: #374151 !important;
}

/* ===== LINKS ===== */

.prose a {
  color: #2563eb !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  border-bottom: 2px solid transparent !important;
  transition: all 0.2s ease !important;
}

.prose a:hover {
  color: #1d4ed8 !important;
  border-bottom-color: #2563eb !important;
}

/* CTA links styling */
.prose a[href*="cloud.seiri.app"] {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  color: white !important;
  padding: 0.75rem 1.5rem !important;
  border-radius: 0.5rem !important;
  font-weight: 600 !important;
  display: inline-block !important;
  margin: 1rem 0 !important;
  border: none !important;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}

.prose a[href*="cloud.seiri.app"]:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
  color: white !important;
  border: none !important;
}

/* ===== HORIZONTAL RULES ===== */

.prose hr {
  border: none !important;
  height: 2px !important;
  background: linear-gradient(to right, transparent, #2563eb, transparent) !important;
  margin: 3rem 0 !important;
}

/* ===== STRONG TEXT ===== */

.prose strong {
  color: #1f2937 !important;
  font-weight: 700 !important;
}

/* ===== EMPHASIS ===== */

.prose em {
  color: #4b5563 !important;
  font-style: italic !important;
}

/* ===== CODE STYLING (inline) ===== */

.prose code:not(.chroma code) {
  background-color: #dbeafe !important;
  color: #1d4ed8 !important;
  padding: 0.125rem 0.375rem !important;
  border-radius: 0.375rem !important;
  font-size: 0.875em !important;
  font-weight: 500 !important;
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace !important;
}

.prose code::before,
.prose code::after {
  content: '' !important;
}

/* ===== EMOJI AND ICONS ===== */

.prose p:has-text("✨"),
.prose p:has-text("🎯"),
.prose p:has-text("😴"),
.prose p:has-text("💰") {
  font-size: 1.125rem !important;
  line-height: 1.6 !important;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
  .prose h1 {
    font-size: 1.875rem !important;
    margin-top: 2rem !important;
    margin-bottom: 1.5rem !important;
  }
  
  .prose h2 {
    font-size: 1.5rem !important;
    margin-top: 2rem !important;
    margin-bottom: 1rem !important;
    padding-left: 0.75rem !important;
  }
  
  .prose h3 {
    font-size: 1.25rem !important;
    margin-top: 1.75rem !important;
  }
  
  .prose img {
    margin: 2rem -1rem !important;
    border-radius: 0 !important;
    width: calc(100% + 2rem) !important;
  }
  
  .prose img + em {
    margin-left: 1rem !important;
    margin-right: 1rem !important;
  }
  
  .prose blockquote {
    margin-left: -1rem !important;
    margin-right: -1rem !important;
    padding: 1rem 1.5rem !important;
    border-radius: 0 !important;
  }
}

/* ===== SECTION SPACING ===== */

/* Add extra spacing around major sections */
.prose h2 + * {
  margin-top: 1.5rem !important;
}

/* ===== ARTICLE SPECIFIC STYLING ===== */

/* First paragraph after header should have larger text */
article .prose > p:first-child {
  font-size: 1.125rem !important;
  line-height: 1.7 !important;
  color: #374151 !important;
  margin-bottom: 2rem !important;
}

/* ===== FINAL OVERRIDES ===== */

/* Ensure our styles take precedence over Tailwind prose */
.prose-lg .prose h1,
.prose-lg .prose h2,
.prose-lg .prose h3,
.prose-lg .prose h4,
.prose-lg .prose h5,
.prose-lg .prose h6 {
  margin-top: inherit !important;
  margin-bottom: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
  color: inherit !important;
}

.prose-lg .prose p {
  margin-top: inherit !important;
  margin-bottom: inherit !important;
  font-size: inherit !important;
  line-height: inherit !important;
}

.prose-lg .prose img {
  margin-top: inherit !important;
  margin-bottom: inherit !important;
}

  .cta-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            padding: 80px 20px;
            text-align: center;
            position: relative;
            overflow: hidden;
        }

        .cta-section::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
            opacity: 0.3;
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            position: relative;
            z-index: 2;
        }

        .cta-content {
            max-width: 600px;
            margin: 0 auto;
        }

        .cta-badge {
            display: inline-block;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            padding: 8px 20px;
            border-radius: 50px;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 24px;
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
        }

        .cta-title {
            font-size: 3rem;
            font-weight: 700;
            color: white;
            margin-bottom: 24px;
            line-height: 1.2;
        }

        .cta-subtitle {
            font-size: 1.25rem;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 40px;
            font-weight: 400;
        }

        .cta-buttons {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
            margin-bottom: 40px;
        }

        .btn {
            padding: 16px 32px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            text-decoration: none;
            display: inline-block;
            transition: all 0.3s ease;
            border: none;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .btn-primary {
            background: white;
            color: #667eea;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
            background: #f8fafc;
        }

        .btn-secondary {
            background: transparent;
            color: white;
            border: 2px solid rgba(255, 255, 255, 0.3);
            backdrop-filter: blur(10px);
        }

        .btn-secondary:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: white;
            transform: translateY(-2px);
        }

        .cta-features {
            display: flex;
            justify-content: center;
            gap: 32px;
            flex-wrap: wrap;
            margin-top: 40px;
        }

        .feature-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255, 255, 255, 0.9);
            font-size: 14px;
        }

        .feature-icon {
            width: 16px;
            height: 16px;
            fill: #4ade80;
        }

        .floating-shapes {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            pointer-events: none;
            overflow: hidden;
        }

        .shape {
            position: absolute;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.1);
            animation: float 6s ease-in-out infinite;
        }

        .shape:nth-child(1) {
            width: 80px;
            height: 80px;
            top: 20%;
            left: 10%;
            animation-delay: 0s;
        }

        .shape:nth-child(2) {
            width: 60px;
            height: 60px;
            top: 60%;
            right: 15%;
            animation-delay: 2s;
        }

        .shape:nth-child(3) {
            width: 40px;
            height: 40px;
            top: 30%;
            right: 30%;
            animation-delay: 4s;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0px) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(180deg); }
        }

        @media (max-width: 768px) {
            .cta-section {
                padding: 60px 20px;
            }
            
            .cta-title {
                font-size: 2.5rem;
            }
            
            .cta-subtitle {
                font-size: 1.1rem;
            }
            
            .cta-buttons {
                flex-direction: column;
                align-items: center;
            }
            
            .btn {
                width: 100%;
                max-width: 280px;
            }
            
            .cta-features {
                flex-direction: column;
                gap: 16px;
            }
        }