/* ============================================
   BLOG.CSS - BLOG LIST, BLOG DETAIL
   Màu sắc tươi sáng, phù hợp đồ cưới
   ============================================ */

/* === BLOG LIST PAGE === */
.blog-list {
    padding: 60px 0;
    background-color: var(--bg-body);
}

.blog-header {
    text-align: center;
    margin-bottom: 50px;
}

.blog-header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.blog-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
}

.blog-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Blog Card */
.blog-card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(232, 93, 143, 0.15);
}

/* Blog Image */
.blog-image {
    display: block;
    height: 240px;
    overflow: hidden;
    position: relative;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.08);
}

.blog-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(232, 93, 143, 0.3), rgba(212, 175, 55, 0.3));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.blog-card:hover .blog-image::before {
    opacity: 1;
}

/* Blog Category Badge */
.blog-category {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Blog Content */
.blog-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Blog Meta */
.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.blog-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-meta-item i {
    color: var(--secondary-color);
    font-size: 0.75rem;
}

/* Blog Title */
.blog-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 15px;
}

.blog-title a {
    color: var(--text-dark);
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: var(--primary-color);
}

/* Blog Excerpt */
.blog-excerpt {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Read More Button */
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
    transition: all 0.3s ease;
}

.read-more i {
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: var(--primary-dark);
    gap: 12px;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination .page-item {
    list-style: none;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-dark);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.pagination .active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.pagination .disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === BLOG DETAIL PAGE === */
.blog-detail {
    padding: 60px 0;
    background: var(--bg-body);
}

/* Blog Detail Container */
.blog-detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.08);
}

/* Blog Detail Title */
.blog-detail-title {
    color: var(--primary-color);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    line-height: 1.3;
    text-align: center;
}

/* Blog Detail Meta */
.blog-detail-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.blog-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.blog-detail-meta-item i {
    color: var(--secondary-color);
    width: 16px;
}

.blog-detail-meta-item a {
    color: var(--text-muted);
}

.blog-detail-meta-item a:hover {
    color: var(--primary-color);
}

/* Blog Detail Featured Image */
.blog-featured-image {
    margin-bottom: 30px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.blog-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Blog Content */
.blog-content {
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
}

.blog-content h2 {
    font-size: 1.8rem;
}

.blog-content h3 {
    font-size: 1.5rem;
}

.blog-content p {
    margin-bottom: 20px;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    margin: 25px auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.blog-content figure {
    margin: 30px 0;
    text-align: center;
}

.blog-content figure figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

.blog-content blockquote {
    background: var(--bg-light);
    border-left: 4px solid var(--secondary-color);
    padding: 20px 30px;
    margin: 30px 0;
    border-radius: 15px;
    font-style: italic;
    color: var(--text-dark);
}

.blog-content ul,
.blog-content ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.blog-content li {
    margin-bottom: 8px;
}

/* Tags */
.blog-tags {
    margin: 30px 0;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tags-title {
    font-weight: 700;
    color: var(--text-dark);
    margin-right: 15px;
    display: inline-block;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-light);
    color: var(--text-dark);
    padding: 6px 14px;
    border-radius: 25px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
    margin: 0 5px 10px 0;
    border: 1px solid var(--border-color);
}

.tag-badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Rating Widget */
.rating-widget {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.rating-widget h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.star-rating {
    display: inline-block;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.star-icon {
    cursor: pointer;
    transition: all 0.2s ease;
}

.star-icon:hover {
    transform: scale(1.1);
}

.rating-info {
    color: var(--text-muted);
}

.rating-message {
    min-height: 50px;
}

/* Share Section */
.share-section {
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.share-links-title {
    color: var(--text-dark);
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-light);
    color: var(--text-dark);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: white;
}

.social-icon.facebook:hover {
    background: #1877f2;
}

.social-icon.twitter:hover {
    background: #1da1f2;
}

.social-icon.linkedin:hover {
    background: #0077b5;
}

.social-icon.zalo:hover {
    background: #0068ff;
}

/* Author Box */
.author-box {
    background: var(--bg-light);
    border-radius: 20px;
    padding: 30px;
    margin: 40px 0;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.author-avatar {
    text-align: center;
}

.author-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--secondary-color);
}

.author-info h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.author-info h3 a {
    color: var(--primary-color);
}

.author-job {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.author-bio {
    color: var(--text-light);
    line-height: 1.6;
}

.author-social {
    margin-top: 15px;
}

.author-social .btn {
    margin: 0 5px;
    border-radius: 25px;
}

/* Related Posts */
.related-posts {
    background: var(--bg-light);
    padding: 60px 0;
}

.related-posts .section-title {
    margin-bottom: 40px;
}

.related-card {
    background: var(--bg-white);
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(232, 93, 143, 0.15);
}

.related-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.4s ease;
}

.related-card:hover img {
    transform: scale(1.05);
}

.related-card .card-body {
    padding: 20px;
}

.related-card .card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.related-card:hover .card-title {
    color: var(--primary-color);
}

/* === RESPONSIVE BLOG === */
@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .blog-detail-container {
        padding: 30px;
    }
    
    .blog-detail-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .blog-list {
        padding: 40px 0;
    }
    
    .blog-header h1 {
        font-size: 1.8rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .blog-image {
        height: 200px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-title {
        font-size: 1.1rem;
    }
    
    .blog-detail {
        padding: 40px 0;
    }
    
    .blog-detail-container {
        padding: 20px;
    }
    
    .blog-detail-title {
        font-size: 1.5rem;
    }
    
    .blog-detail-meta {
        gap: 12px;
    }
    
    .blog-detail-meta-item {
        font-size: 0.75rem;
    }
    
    .author-box .row {
        flex-direction: column;
        text-align: center;
    }
    
    .author-avatar {
        margin-bottom: 20px;
    }
    
    .author-social {
        text-align: center;
        margin-top: 20px;
    }
    
    .share-section {
        flex-direction: column;
        align-items: center !important;
    }
    
    .related-card img {
        height: 180px;
    }
}

@media (max-width: 576px) {
    .blog-header h1 {
        font-size: 1.5rem;
    }
    
    .blog-header p {
        font-size: 0.9rem;
    }
    
    .blog-image {
        height: 180px;
    }
    
    .blog-meta {
        gap: 10px;
    }
    
    .blog-detail-title {
        font-size: 1.3rem;
    }
    
    .blog-detail-meta {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .pagination .page-link {
        min-width: 35px;
        height: 35px;
        font-size: 0.85rem;
    }
    
    .tag-badge {
        padding: 4px 10px;
        font-size: 0.7rem;
    }
    
    .related-card .card-title {
        font-size: 0.9rem;
    }
}