/*
Theme Name: Modern Blog
Theme URI: https://example.com
Author: Your Name
Author URI: https://example.com
Description: Modern WordPress theme with Bootstrap 5 for blog with beautiful design and responsive layout
Version: 1.0
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: modern-blog
Tags: blog, bootstrap, modern, responsive, clean, minimal
*/

:root {
    --primary-color: #6366f1;
    --secondary-color: #8b5cf6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --text-color: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Global Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}

.site-logo:hover {
    color: var(--secondary-color);
}

.main-navigation .nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.main-navigation .nav-link:hover,
.main-navigation .nav-link.active {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 4rem 0;
    margin-bottom: 3rem;
}

.hero-section h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* Blog Post Card */
.post-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-card-body {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.post-title a {
    color: var(--dark-color);
    text-decoration: none;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-color);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.post-meta .author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    transition: gap 0.3s ease;
}

.read-more:hover {
    gap: 1rem;
}

/* Single Post */
.single-post-header {
    text-align: center;
    padding: 3rem 0;
    background: var(--light-color);
    margin-bottom: 3rem;
}

.single-post-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.125rem;
    line-height: 1.8;
}

.single-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
    margin: 2rem 0;
}

.single-post-content h2,
.single-post-content h3 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

.single-post-content ul,
.single-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.single-post-content li {
    margin-bottom: 0.5rem;
}

.single-post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-color);
}

.single-post-content code {
    background: var(--light-color);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.single-post-content pre {
    background: var(--dark-color);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 2rem 0;
}

.single-post-content pre code {
    background: transparent;
    padding: 0;
}

/* Featured Image */
.featured-image-wrapper {
    max-width: 1200px;
    margin: 0 auto 3rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 2rem 0;
}

.tag {
    background: var(--light-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* Comments Section */
.comments-section {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem;
    background: var(--light-color);
    border-radius: 1rem;
}

/* Sidebar */
.sidebar-widget {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.sidebar-widget.sticky-top {
    position: sticky;
    z-index: 100;
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.post-nav-item a {
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-nav-item a:hover {
    color: var(--primary-color);
}

.post-nav-item a h5 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
}

.post-nav-label {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.widget-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.widget-post-item:last-child {
    border-bottom: none;
}

.widget-post-thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.widget-post-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.widget-post-title a {
    color: var(--dark-color);
}

.widget-post-title a:hover {
    color: var(--primary-color);
}

.widget-post-date {
    font-size: 0.8rem;
    color: #64748b;
}

/* Search Widget */
.search-form {
    position: relative;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-form button {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    cursor: pointer;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Footer */
.site-footer {
    background: var(--dark-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-widget {
    margin-bottom: 2rem;
}

.footer-widget h3 {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

.footer-widget ul li {
    margin-bottom: 0.5rem;
}

.footer-widget ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .single-post-title {
        font-size: 2rem;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.6s ease-out;
}
