/* Blog Gallery Styles */
.blog-gallery-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 15px 0;
}

.blog-gallery-image:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.blog-gallery-link {
    display: inline-block;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.blog-gallery-link:hover {
    opacity: 0.9;
}

.blog-gallery-link:hover .blog-gallery-image {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.blog-gallery-section {
    margin: 40px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

.blog-gallery-section h4 {
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Blog Detail Page Enhancements */
.blog-content-text {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
}

/* Blog Content Images - Max width and block display */
.blog-content-text img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 20px auto !important;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    clear: both;
}

/* Ensure images inside paragraphs are also block level */
.blog-content-text p img,
.blog-content-text p > img {
    display: block !important;
    margin: 20px auto !important;
    max-width: 100% !important;
    clear: both;
}

/* Fix for images wrapped in links */
.blog-content-text a img {
    display: block !important;
    max-width: 100% !important;
}

/* Figure elements */
.blog-content-text figure {
    margin: 20px 0;
    max-width: 100%;
    display: block;
    clear: both;
}

.blog-content-text figure img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Ensure paragraphs after images start on new line */
.blog-content-text p {
    clear: both;
}

/* Gallery images specific styling */
.blog-content-text .blog-gallery-image {
    max-width: 100% !important;
    display: block !important;
    margin: 20px auto !important;
    clear: both;
}

.blog-content-text h2 {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    margin: 30px 0 15px 0;
    line-height: 1.3;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.blog-content-text h3 {
    color: #34495e;
    font-size: 24px;
    font-weight: 600;
    margin: 25px 0 12px 0;
    line-height: 1.3;
    border-left: 4px solid #3498db;
    padding-left: 15px;
}

.blog-content-text h4 {
    color: #34495e;
    font-size: 20px;
    font-weight: 600;
    margin: 20px 0 10px 0;
    line-height: 1.3;
}

.blog-content-text p {
    margin-bottom: 15px;
    color: #555;
}

.blog-content-text ul, .blog-content-text ol {
    margin: 15px 0;
    padding-left: 30px;
}

.blog-content-text li {
    margin-bottom: 8px;
    color: #555;
}

.blog-content-text strong {
    font-weight: 600;
    color: #2c3e50;
}

.blog-content-text em {
    font-style: italic;
    color: #666;
}

.blog-content-text blockquote {
    border-left: 4px solid #3498db;
    background: #f8f9fa;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.blog-content-text code {
    background: #f1f3f4;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #e74c3c;
}

.blog-content-text pre {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 15px 0;
}

.blog-content-text pre code {
    background: none;
    color: inherit;
    padding: 0;
}

.blog-content-text hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, #3498db, transparent);
    margin: 30px 0;
}

.blog-toc {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.blog-toc h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.blog-toc h4 i {
    color: #3498db;
    margin-right: 8px;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-list li {
    margin-bottom: 8px;
}

.toc-list a {
    color: #495057;
    text-decoration: none;
    padding: 8px 12px;
    display: block;
    border-radius: 4px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-list a:hover {
    background: #e9ecef;
    color: #2c3e50;
    border-left-color: #3498db;
    transform: translateX(5px);
}

.toc-list a.active {
    color: #3498db;
    background: #e3f2fd;
    border-left-color: #3498db;
    font-weight: 600;
    transform: translateX(5px);
}

.blog-content-text h2 {
    color: #2c3e50;
    margin: 30px 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.blog-content-text h3 {
    color: #34495e;
    margin: 25px 0 15px 0;
    font-size: 22px;
    font-weight: 600;
}

.blog-content-text h4 {
    color: #2c3e50;
    margin: 20px 0 10px 0;
    font-size: 18px;
    font-weight: 600;
}

.blog-content-text p {
    margin-bottom: 20px;
    color: #555;
}

.blog-content-text ul, .blog-content-text ol {
    margin: 15px 0;
    padding-left: 30px;
}

.blog-content-text li {
    margin-bottom: 8px;
    color: #555;
}

.blog-content-text strong {
    color: #2c3e50;
    font-weight: 600;
}

.blog-content-text em {
    color: #7f8c8d;
    font-style: italic;
}

.blog-meta a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-meta a:hover {
    color: #2980b9;
}

.category-link, .tag-link {
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 5px;
}

.category-link:hover, .tag-link:hover {
    background: #3498db;
    color: white !important;
}

.tagcloud a {
    background: #f8f9fa;
    color: #495057;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
}

.tagcloud a:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-1px);
}

.social-links a {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.social-links a:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.social-links a:hover i.fa-facebook-f { color: #3b5998; }
.social-links a:hover i.fa-twitter { color: #1da1f2; }
.social-links a:hover i.fa-linkedin-in { color: #0077b5; }
.social-links a:hover i.fa-instagram { color: #e4405f; }

/* Blog Grid Enhancements */
.blog-bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.blog-date, .blog-category {
    color: #6c757d;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-date:hover, .blog-category:hover {
    color: #3498db;
}

.blog-category {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.blog-category:hover {
    background: #3498db;
    color: white !important;
}

.vs-blog.blog-style2 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.vs-blog.blog-style2:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.blog-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-title a:hover {
    color: #3498db;
}

.blog-img img {
    transition: transform 0.3s ease;
}

.vs-blog.blog-style2:hover .blog-img img {
    transform: scale(1.05);
}

/* Pagination Styling */
.vs-pagination ul {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.vs-pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.vs-pagination li a:hover,
.vs-pagination li.active a {
    background: #3498db;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .blog-gallery-image {
        margin: 10px 0;
    }
    
    .blog-gallery-section {
        margin: 30px 0;
        padding: 15px 0;
    }
    
    .blog-content-text h2 {
        font-size: 24px;
    }
    
    .blog-content-text h3 {
        font-size: 20px;
    }
    
    .blog-content-text {
        font-size: 15px;
    }
    
    .blog-meta {
        flex-wrap: wrap;
    }
    
    .blog-meta a {
        margin-bottom: 5px;
    }
    
    .blog-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .vs-blog.blog-style2 {
        margin-bottom: 30px;
    }
}

/* Blog Rating System Construction */
.blog-rating-section {
    background: #fcfcfc;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 40px;
    margin-top: 50px;
    margin-bottom: 50px;
}

.rating-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 20px;
}

.helpful-question {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
}

.helpful-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.helpful-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 100px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.helpful-btn:hover {
    background: #f9f9f9;
    border-color: #ccc;
}

.helpful-btn.active {
    background: #eef2f5;
    border-color: #bbb;
    color: #000;
}

.helpful-btn i {
    font-size: 16px;
}

.star-rating-question {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
}

.star-rating .stars {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}

.star-rating .star {
    font-size: 32px;
    color: #e0e0e0; /* Light gray for inactive state */
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.star-rating .star:hover,
.star-rating .star.active {
    color: #e0e0e0; /* Wait, active needs color */
}

/* JS handles the coloring, but let's set a hover class just in case or rely on JS setting style/color directly.
   However, usually CSS handles .active or :hover.
   The screenshot shows gray stars. Usually filled ones are yellow/gold.
*/
.star-rating .star.active {
    color: #ffcc00; /* Gold */
}
.star-rating .star.hover {
    color: #ffcc00;
}

/* Stats Section */
.rating-stats {
    display: flex;
    justify-content: space-between; /* Space them out evenly */
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 10px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    position: relative;
}

/* Remove border from last item if we had separators, but here we just want spacing */

.stat-number {
    font-size: 24px;
    font-weight: 800;
    color: #222;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Feedback Form Styles */
.feedback-form {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #eee;
    display: none; /* Hidden by default */
}

.feedback-form.show {
    display: block;
}

.feedback-textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 80px;
    margin-bottom: 10px;
    font-size: 14px;
    resize: vertical;
}

.feedback-submit {
    background: #333;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
}

.feedback-submit:hover {
    background: #000;
}
