/* =======================================================
   Theme Beautification Enhancements
   ======================================================= */

/* =======================================================
   1. Modern Typography
   ======================================================= */

/* Improved font smoothing and rendering */
body {
    font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Enhanced heading styles */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.03em;
    font-weight: 700;
    line-height: 1.2;
}

/* Post titles with better styling */
.post-title {
    font-size: 1.4rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-title:hover {
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* =======================================================
   2. Enhanced Color Scheme
   ======================================================= */

/* Modern color variables */
:root {
    --gradient-primary: linear-gradient(135deg, var(--accent-color) 0%, var(--hover-color) 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =======================================================
   3. Hero Section Enhancements
   ======================================================= */

.hero-section {
    background: var(--bg-secondary);
    border-radius: 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 50%, rgba(0, 113, 227, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(0, 113, 227, 0.12) 0%, transparent 40%),
                radial-gradient(circle at 40% 80%, rgba(0, 113, 227, 0.08) 0%, transparent 60%);
    animation: hero-background-move 25s ease-in-out infinite;
    z-index: 0;
}

.hero-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    color: var(--text-tertiary);
    max-width: 700px;
}

/* Enhanced hero search */
.hero-search {
    max-width: 550px;
}

.search-form {
    display: flex;
    gap: 12px;
    align-items: stretch;
    background: var(--bg-secondary);
    padding: 8px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-form:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.search-form input[type="search"] {
    flex: 1;
    padding: 16px 20px;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.search-form input[type="submit"] {
    padding: 0 28px;
    border: none;
    background: var(--gradient-primary);
    color: white;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.search-form input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* =======================================================
   4. Post Card Enhancements
   ======================================================= */

.post-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.post-card:hover::before {
    transform: scaleX(1);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

/* Enhanced post thumbnails */
.post-thumbnail {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-card:hover .post-thumbnail img {
    transform: scale(1.08);
}

/* Enhanced post categories */
.cat-links a {
    display: inline-block;
    background: rgba(0, 113, 227, 0.1);
    color: var(--accent-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    transition: var(--transition);
}

.cat-links a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-1px);
}

/* Enhanced read more button */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9375rem;
    margin-top: 16px;
}

.read-more-link:hover {
    gap: 12px;
    color: var(--hover-color);
    transform: translateX(4px);
}

/* =======================================================
   5. Sidebar Enhancements
   ======================================================= */

.widget {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 28px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.widget:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 24px;
    position: relative;
    padding-bottom: 12px;
}

.widget-title::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    bottom: 0;
    left: 0;
    background: var(--gradient-primary);
    border-radius: 3px;
}

/* Enhanced widget links */
.widget ul li a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9375rem;
    padding: 10px 0;
    position: relative;
    overflow: hidden;
}

.widget ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--accent-color);
    transform: scaleY(0);
    transition: var(--transition);
}

.widget ul li a:hover::before {
    transform: scaleY(1);
}

.widget ul li a:hover {
    color: var(--accent-color);
    padding-left: 12px;
}

/* Enhanced tag cloud */
.tagcloud a {
    background: rgba(0, 113, 227, 0.08);
    color: var(--accent-color);
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid transparent;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

.tagcloud a:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

/* =======================================================
   6. Button Enhancements
   ======================================================= */

.button, .read-more-link, .comment-reply-link, .social-share-link {
    transition: var(--transition);
}

.button:hover, .read-more-link:hover, .comment-reply-link:hover, .social-share-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* =======================================================
   7. Navigation Enhancements
   ======================================================= */

.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

/* Enhanced navigation links */
#primary-menu a {
    position: relative;
    padding: 8px 0;
}

#primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
    border-radius: 2px;
}

#primary-menu a:hover::after {
    width: 100%;
}

/* =======================================================
   8. Footer Enhancements
   ======================================================= */

.site-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 60px 0 30px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* =======================================================
   9. Single Post Enhancements
   ======================================================= */

.single-post {
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    padding: 48px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.single-post .post-title {
    font-size: 2.5rem;
    margin-bottom: 28px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced author bio */
.author-bio {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 36px;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-lg);
    margin: 40px 0;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.author-bio:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

/* =======================================================
   10. Animation Enhancements
   ======================================================= */

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

/* Fade-in animation for content */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced hero background animation */
@keyframes hero-background-move {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.7;
    }
    33% {
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.8;
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
        opacity: 0.6;
    }
}

/* =======================================================
   11. Responsive Enhancements
   ======================================================= */

@media (max-width: 1024px) {
    .hero-content h2 {
        font-size: 2.4rem;
    }
    
    .hero-content p {
        font-size: 1.15rem;
    }
    
    .single-post {
        padding: 32px;
    }
    
    .single-post .post-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 70px 0;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 32px;
    }
    
    .post-thumbnail {
        height: 180px;
    }
    
    .content-wrapper {
        gap: 30px;
    }
    
    .single-post {
        padding: 24px;
    }
    
    .single-post .post-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 1.6rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .post-thumbnail {
        height: 150px;
    }
    
    .content-area {
        padding: 20px;
    }
    
    .widget {
        padding: 20px;
    }
}

/* =======================================================
   12. Additional Enhancements
   ======================================================= */

/* Enhanced scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-tertiary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Enhanced selection */
::selection {
    background: rgba(0, 113, 227, 0.2);
    color: var(--text-primary);
}

::-moz-selection {
    background: rgba(0, 113, 227, 0.2);
    color: var(--text-primary);
}