/* Blog Detail Page Styles */

:root {
    --primary-color: #039a3a;
    --primary-dark: #027a2e;
    --secondary-color: #ffc107;
    --text-color: #2d3748;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --bg-light: #f7fafc;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

/* Breadcrumb */
.breadcrumb-section {
    background: var(--bg-light) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Blog Detail Hero with Background Image */
.blog-detail-hero {
    position: relative;
    background-size: cover !important;
    background-position: center !important;
    min-height: 500px;
}

.blog-detail-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(3, 154, 58, 0.85), rgba(2, 122, 46, 0.9));
}

.blog-detail-hero .breadcrumb {
    background: transparent !important;
    padding: 0;
}

.blog-detail-hero .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.7);
    content: "›";
}

.blog-detail-hero .breadcrumb-item a {
    color: white !important;
    text-decoration: none !important;
}

.blog-detail-hero .breadcrumb-item a:hover {
    text-decoration: underline !important;
}

.blog-detail-hero .breadcrumb-item.active {
    color: rgba(255,255,255,0.9) !important;
}

.blog-detail-hero h1 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
    line-height: 1.2;
}

.blog-detail-hero .badge {
    background: white !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

.blog-detail-hero .post-meta {
    color: white !important;
    font-size: 0.95rem;
}

.blog-detail-hero .post-meta i {
    color: rgba(255,255,255,0.9);
}

.blog-detail-hero .post-meta span {
    color: white !important;
}

/* Featured Image */
.featured-image-section img {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.post-featured-card {
    border: 1px solid var(--border-color);
}

.post-featured-image-wrap {
    overflow: visible;
    border-radius: 14px;
}

.post-featured-image {
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.10);
    width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    opacity: 0;
    animation: postFeaturedFadeIn 600ms ease-out forwards;
    transition: filter 350ms ease;
}

.post-featured-card:hover .post-featured-image {
    filter: saturate(1.05);
}

.post-featured-summary {
    text-align: center;
}

.post-featured-summary small {
    display: block;
    font-style: italic;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1.4;
}

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

/* Article Content */
.blog-article {
    border: 1px solid var(--border-color);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 600;
}

.article-content h2 {
    font-size: 1.75rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content h4 {
    font-size: 1.25rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-content figure {
    margin: 2rem 0;
}

.article-content figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    font-style: italic;
}

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

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

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

.article-content code {
    background: var(--bg-light);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.article-content pre {
    background: #1e293b;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

/* Social Sharing */
.social-sharing {
    border: 1px solid var(--border-color);
}

.share-icons {
    gap: 0.75rem;
}

.share-icon-btn,
.share-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
    border-radius: 999px;
    padding: 0.55rem;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.share-icon-btn:hover,
.share-copy-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.10);
}

.share-icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
    display: block;
}

.share-copy-btn {
    cursor: pointer;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
}

.share-copy-text {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
}

.btn-facebook {
    background: #1877f2;
    color: white;
    border: none;
}

.btn-facebook:hover {
    background: #145dbf;
    color: white;
}

.btn-twitter {
    background: #1da1f2;
    color: white;
    border: none;
}

.btn-twitter:hover {
    background: #1a8cd8;
    color: white;
}

.btn-linkedin {
    background: #0077b5;
    color: white;
    border: none;
}

.btn-linkedin:hover {
    background: #006399;
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background: #1faa52;
    color: white;
}

/* Comments Section */
.comments-section {
    border: 1px solid var(--border-color);
}

.comment-form textarea {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
}

.comment-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(3, 154, 58, 0.1);
}

.comment-item:last-child {
    border-bottom: none !important;
}

.avatar-circle {
    font-weight: 600;
}

.comment-content h6 {
    font-weight: 600;
    color: var(--text-color);
}

/* Sidebar */
.author-box,
.related-posts,
.categories-widget,
.newsletter-widget {
    border: 1px solid var(--border-color);
}

.related-post-item:last-child {
    border-bottom: none !important;
}

.related-post-item a {
    color: var(--text-color);
    transition: color 0.2s;
}

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

.related-post-item h6 {
    font-weight: 600;
    font-size: 0.95rem;
}

.categories-widget a {
    transition: background 0.2s;
}

.categories-widget a:hover,
.hover-bg:hover {
    background: var(--bg-light);
}

.newsletter-widget .form-control {
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
}

.newsletter-widget .form-control::placeholder {
    color: rgba(255,255,255,0.7);
}

.newsletter-widget .form-control:focus {
    background: rgba(255,255,255,0.2);
    border-color: white;
    color: white;
}

/* Responsive */
@media (max-width: 991px) {
    .blog-detail-hero {
        min-height: 450px;
    }
    
    .blog-detail-hero h1 {
        font-size: 2rem !important;
    }
    
    .blog-detail-hero .post-meta {
        font-size: 0.9rem;
        gap: 0.75rem !important;
    }
    
    .article-content {
        font-size: 1rem;
    }
    
    .article-content h2 {
        font-size: 1.5rem;
    }
    
    .article-content h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    .blog-detail-hero {
        min-height: 400px;
        margin-top: 60px !important;
    }
    
    .blog-detail-hero .row {
        padding-top: 2rem;
    }
    
    .blog-detail-hero h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .blog-detail-hero .badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .blog-detail-hero .breadcrumb {
        font-size: 0.85rem;
    }
    
    .blog-detail-hero .post-meta {
        font-size: 0.85rem;
        gap: 0.5rem !important;
    }
    
    .blog-detail-hero .post-meta .d-flex {
        font-size: 0.85rem;
    }
    
    .blog-detail-hero .post-meta i {
        font-size: 0.9rem;
    }
    
    .blog-article {
        padding: 1.5rem !important;
    }
    
    .social-sharing .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .share-icons {
        gap: 0.6rem;
    }

    .share-icon-img {
        width: 24px;
        height: 24px;
    }

    .share-copy-btn {
        padding: 0.5rem 0.8rem;
    }

    .share-copy-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .blog-detail-hero {
        min-height: 350px;
        margin-top: 50px !important;
    }
    
    .blog-detail-hero .row {
        padding-top: 1.5rem;
    }
    
    .blog-detail-hero h1 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-detail-hero .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.7rem;
    }
    
    .blog-detail-hero .breadcrumb {
        font-size: 0.75rem;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-detail-hero .post-meta {
        font-size: 0.75rem;
        gap: 0.4rem !important;
    }
    
    .blog-detail-hero .post-meta i {
        font-size: 0.85rem;
    }
    
    .social-sharing .btn {
        font-size: 0.75rem;
        padding: 0.35rem 0.7rem;
        margin-bottom: 0.5rem;
    }

    .post-featured-image {
        max-height: none;
    }

    .share-icons {
        gap: 0.5rem;
    }

    .share-icon-btn,
    .share-copy-btn {
        padding: 0.5rem;
    }

    .share-copy-btn {
        padding: 0.5rem 0.7rem;
    }

    .share-icon-img {
        width: 22px;
        height: 22px;
    }

    .share-copy-text {
        font-size: 0.85rem;
    }
}
