/* ============================================
   UNFILTERED WISDOM - ENHANCED VISUAL STYLES
   WordPress-Inspired Design Enhancement
   ============================================ */

/* This file extends the existing style.css with enhanced visual elements
   while preserving all AI citation elements and core functionality */

/* ============================================
   ENHANCED COLOR PALETTE
   ============================================ */
:root {
    /* Existing colors preserved */
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #dc2626;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    
    /* Enhanced palette additions */
    --purple-50: #faf5ff;
    --purple-100: #f3e8ff;
    --purple-600: #9333ea;
    --blue-50: #eff6ff;
    --blue-100: #dbeafe;
    --green-50: #f0fdf4;
    --green-500: #22c55e;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
}

/* ============================================
   ENHANCED HERO SECTION
   ============================================ */
.hero {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* Animated background pattern */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: heroPattern 20s ease-in-out infinite;
    pointer-events: none;
}

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

/* Enhanced hero content */
.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out;
}

.hero .subtitle {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .hero-description {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   ENHANCED CONTENT CARDS
   ============================================ */
.content-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--purple-100) 0%, var(--blue-100) 100%);
}

.card-content {
    padding: 1.5rem;
}

.card-category {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--purple-100);
    color: var(--secondary-color);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.read-time::before {
    content: '📖 ';
}

/* ============================================
   SIDEBAR WIDGETS
   ============================================ */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.widget {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

/* Author Widget */
.author-widget {
    text-align: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    border: 4px solid var(--purple-100);
    background: linear-gradient(135deg, var(--purple-100) 0%, var(--blue-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}

.author-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.author-title {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.author-bio {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Related Articles Widget */
.related-article {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background var(--transition-fast);
}

.related-article:last-child {
    border-bottom: none;
}

.related-article:hover {
    background: var(--bg-light);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.related-thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--purple-100) 0%, var(--blue-100) 100%);
}

.related-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

/* Quick Links Widget */
.quick-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.quick-links li {
    margin-bottom: 0.75rem;
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-weight: 500;
}

.quick-links a:hover {
    color: var(--primary-color);
}

.quick-links a::before {
    content: '→';
    color: var(--primary-color);
    font-weight: 700;
}

/* ============================================
   PULL QUOTES & CALLOUTS
   ============================================ */
.pull-quote {
    background: linear-gradient(135deg, var(--purple-50) 0%, var(--blue-50) 100%);
    border-left: 4px solid var(--secondary-color);
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 0 12px 12px 0;
    font-size: 1.25rem;
    font-style: italic;
    color: var(--text-dark);
    position: relative;
}

.pull-quote::before {
    content: '"';
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: 10px;
    font-family: Georgia, serif;
}

.callout-box {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.callout-box.info {
    border-color: var(--primary-color);
    background: var(--blue-50);
}

.callout-box.warning {
    border-color: #f59e0b;
    background: #fffbeb;
}

.callout-box.success {
    border-color: var(--green-500);
    background: var(--green-50);
}

.callout-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.callout-title::before {
    content: 'ℹ️';
    font-size: 1.25rem;
}

.callout-box.warning .callout-title::before {
    content: '⚠️';
}

.callout-box.success .callout-title::before {
    content: '✓';
}

/* ============================================
   ENHANCED BUTTONS & CTAs
   ============================================ */
.cta-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    margin: 3rem 0;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: ctaGlow 3s ease-in-out infinite;
}

@keyframes ctaGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-10%, -10%); }
}

.cta-box h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.cta-box p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.btn-large {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary-color) !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ============================================
   ICON SYSTEM
   ============================================ */
.icon-list {
    list-style: none;
    padding: 0;
}

.icon-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.icon-list li::before {
    content: '✓';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    flex-shrink: 0;
    font-weight: 700;
    font-size: 1rem;
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border-color);
    z-index: 9999;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    width: 0%;
    transition: width 0.1s ease;
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    z-index: 1000;
    font-size: 1.5rem;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* ============================================
   ENHANCED FOOTER
   ============================================ */
footer {
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    padding: 4rem 0 2rem;
}

.footer-section h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.footer-section ul li a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: all var(--transition-fast);
}

.footer-section ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   ARTICLE LAYOUT WITH SIDEBAR
   ============================================ */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 20px;
}

.article-content {
    min-width: 0; /* Prevents grid blowout */
}

/* Featured Article Header */
.article-header {
    margin-bottom: 3rem;
}

.article-featured-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.article-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.95rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   ENHANCED TYPOGRAPHY
   ============================================ */
.article-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem;
}

.article-content p {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.article-content p:first-of-type::first-letter {
    font-size: 3.5rem;
    font-weight: 700;
    float: left;
    line-height: 1;
    margin: 0.1rem 0.5rem 0 0;
    color: var(--secondary-color);
}

.article-content a {
    color: var(--primary-color);
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    text-underline-offset: 3px;
    transition: all var(--transition-fast);
}

.article-content a:hover {
    text-decoration-color: var(--primary-color);
    color: var(--secondary-color);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .article-title {
        font-size: 2rem;
    }
    
    .article-featured-image {
        height: 250px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cta-box {
        padding: 2rem 1.5rem;
    }
    
    .cta-box h3 {
        font-size: 1.5rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }