/* ================================
   Blog Hero Section
   ================================ */
.blog-hero {
    background: var(--gradient);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.6s ease;
}

.blog-hero p {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease;
}

/* Search Form */
.blog-search {
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease;
}

.search-form {
    width: 100%;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    border-radius: 50px;
    padding: 5px;
    backdrop-filter: blur(10px);
}

.search-input-group input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 20px;
    color: white;
    font-size: 1rem;
}

.search-input-group input::placeholder {
    color: rgba(255,255,255,0.7);
}

.search-btn {
    background: white;
    color: var(--blue);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.search-btn:hover {
    transform: scale(1.1);
}

/* ================================
   Featured Posts Section
   ================================ */
.featured-posts {
    background: var(--light);
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gradient);
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.featured-post {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.featured-post:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.main-featured {
    grid-row: span 2;
}

.featured-post .post-image {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.main-featured .post-image {
    height: 400px;
}

.featured-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.featured-post:hover .post-image img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--blue);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.featured-post .post-content {
    padding: 1.5rem;
}

.featured-post h3 {
    margin-bottom: 1rem;
}

.featured-post h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.featured-post h3 a:hover {
    color: var(--blue);
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--gray);
    font-size: 0.9rem;
    margin-top: 1rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ================================
   Blog Content Layout
   ================================ */
.blog-content {
    background: white;
}

.blog-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.blog-card-content h3 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-content h3 a:hover {
    color: var(--blue);
}

.blog-card-content p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.read-more {
    color: var(--blue);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s;
}

.read-more:hover {
    gap: 0.8rem;
}

/* ================================
   Sidebar
   ================================ */
.blog-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.sidebar-widget {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 0.75rem;
}

.sidebar-widget h3:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--gradient);
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-list a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--light);
    border-radius: 5px;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

.category-list a:hover,
.category-list a.active {
    background: var(--gradient);
    color: white;
    transform: translateX(5px);
}

.category-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85rem;
}

/* Popular Posts */
.popular-posts {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.popular-posts article {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #eee;
}

.popular-posts article:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-posts h4 {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.popular-posts h4 a {
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s;
}

.popular-posts h4 a:hover {
    color: var(--blue);
}

.post-views {
    color: var(--gray);
    font-size: 0.85rem;
}

/* Tag Cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 5px 15px;
    background: var(--light);
    color: var(--dark);
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.tag:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

/* Newsletter Widget */
.newsletter-widget {
    background: var(--gradient);
    color: white;
}

.newsletter-widget h3 {
    color: white;
}

.newsletter-widget h3:after {
    background: rgba(255,255,255,0.3);
}

.newsletter-form-sidebar input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    color: white;
    margin-bottom: 1rem;
}

.newsletter-form-sidebar input::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-form-sidebar button {
    width: 100%;
    padding: 0.75rem;
    background: white;
    color: var(--blue);
    border: none;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.3s;
}

.newsletter-form-sidebar button:hover {
    transform: translateY(-2px);
}

/* Social Links */
.social-links-sidebar {
    display: flex;
    gap: 0.75rem;
}

.social-link-sidebar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light);
    color: var(--dark);
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-link-sidebar:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
}

/* ================================
   Pagination
   ================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.page-link,
.page-number {
    padding: 0.5rem 1rem;
    background: white;
    color: var(--dark);
    text-decoration: none;
    border-radius: 5px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.page-link:hover,
.page-number:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-2px);
}

.page-number.active {
    background: var(--gradient);
    color: white;
}

.page-dots {
    color: var(--gray);
}

/* ================================
   POST PAGE STYLES
   ================================ */

/* Post Header */
.blog-post {
    background: white;
}

.post-header {
    background: var(--gradient);
    color: white;
    padding: 80px 0 60px;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: white;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    opacity: 0.6;
}

.breadcrumb .current {
    color: white;
    font-weight: 500;
}

/* Post Meta Header */
.post-meta-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.post-meta-header span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.95;
}

.post-meta-header .post-category {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Post Title */
.post-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

/* Post Excerpt */
.post-excerpt {
    font-size: 1.25rem;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 2rem;
    animation: fadeInUp 0.8s ease;
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.social-share span {
    font-weight: 500;
    opacity: 0.9;
}

.share-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
}

.share-btn:hover {
    background: white;
    transform: translateY(-3px);
}

.share-btn.facebook:hover { color: #1877f2; }
.share-btn.twitter:hover { color: #1da1f2; }
.share-btn.linkedin:hover { color: #0077b5; }
.share-btn.whatsapp:hover { color: #25d366; }
.share-btn.copy-link:hover { color: var(--blue); }

/* Post Featured Image */
.post-featured-image {
    margin: -60px 0 3rem;
    position: relative;
}

.post-featured-image img {
    width: 100%;
    max-height: 600px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
}

/* Post Content */
.post-content {
    padding: 3rem 0;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Body */
.post-body {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 3rem;
}

.post-body h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin: 2.5rem 0 1.5rem;
    position: relative;
    padding-left: 15px;
}

.post-body h2:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: var(--gradient);
}

.post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark);
    margin: 2rem 0 1rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
    margin: 2rem 0;
}

.post-body blockquote {
    border-left: 4px solid var(--blue);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gray);
}

.post-body ul,
.post-body ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.75rem;
}

.post-body a {
    color: var(--blue);
    text-decoration: underline;
}

.post-body a:hover {
    color: var(--pink);
}

/* Post Tags */
.post-tags {
    padding: 2rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.post-tags i {
    color: var(--gray);
}

/* Post Navigation */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-previous,
.nav-next {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-next {
    text-align: right;
    align-items: flex-end;
}

.nav-previous:hover,
.nav-next:hover {
    background: var(--gradient);
    color: white;
    transform: translateY(-3px);
}

.nav-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-previous:hover .nav-label,
.nav-next:hover .nav-label {
    color: rgba(255,255,255,0.8);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--dark);
}

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
    color: white;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: var(--light);
    border-radius: var(--border-radius);
    margin: 3rem 0;
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar i {
    font-size: 80px;
    color: var(--gray);
}

.author-info h4 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.author-info h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.author-info p {
    line-height: 1.6;
    color: #666;
}

/* ================================
   Comments Section
   ================================ */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid #eee;
}

.comments-title {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Comment Form */
.comment-form-wrapper {
    background: var(--light);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
}

.comment-form-wrapper h4 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.comment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.comment-form .form-group {
    display: flex;
    flex-direction: column;
}

.comment-form label {
    font-size: 0.9rem;
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.comment-form input,
.comment-form textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.comment-form textarea {
    resize: vertical;
    min-height: 120px;
}

.comment-form button {
    padding: 0.75rem 2rem;
    background: var(--gradient);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.3s;
}

.comment-form button:hover {
    transform: translateY(-2px);
}

/* Comments List */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.comment {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-avatar i {
    font-size: 50px;
    color: var(--gray);
}

.comment-content {
    flex: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-header h5 {
    font-size: 1.1rem;
    color: var(--dark);
}

.comment-date {
    font-size: 0.9rem;
    color: var(--gray);
}

.comment-content p {
    line-height: 1.6;
    color: #666;
}

/* ================================
   Related Posts
   ================================ */
.related-posts {
    background: var(--light);
    padding: 4rem 0;
}

.related-posts .section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.related-posts .section-title:after {
    left: 50%;
    transform: translateX(-50%);
}

/* ================================
   Utility Classes
   ================================ */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.no-posts i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.no-posts h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.no-posts p {
    margin-bottom: 2rem;
}

.category-header,
.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.category-header h2,
.search-header h2 {
    font-size: 1.5rem;
    color: var(--dark);
    margin: 0;
}

.search-header p {
    margin: 0.5rem 0 0;
}

/* ================================
   Animations
   ================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Responsive Design
   ================================ */
@media (max-width: 992px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .main-featured {
        grid-row: span 1;
    }
    
    .blog-container {
        grid-template-columns: 1fr;
    }
    
    .blog-sidebar {
        position: relative;
        top: auto;
    }
}

@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 2rem;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .comment-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
    }
    
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    
    .comment {
        flex-direction: column;
    }
    
    .post-meta-header {
        font-size: 0.85rem;
    }
    
    .social-share {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .blog-hero h1 {
        font-size: 1.75rem;
    }
    
    .blog-hero p {
        font-size: 1rem;
    }
    
    .post-title {
        font-size: 1.75rem;
    }
    
    .post-excerpt {
        font-size: 1.1rem;
    }
    
    .post-body {
        font-size: 1rem;
    }
}

/* ================================
   Print Styles
   ================================ */
@media print {
    .blog-sidebar,
    .social-share,
    .comments-section,
    .related-posts,
    .post-navigation {
        display: none;
    }
    
    .blog-container {
        grid-template-columns: 1fr;
    }
}
