/* Single Post Wrapper */
.scdev-single-post-wrapper {
    max-width: 900px;
    margin: 0px auto !important;
    padding: 0 0px !important;
}

.scdev-single-post {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Post Header */
.post-header {
    padding: 0 0 20px 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #666;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.post-author:hover {
    opacity: 0.8;
}

.post-author .author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.post-author .author-name {
    font-weight: 600;
    color: #333;
}

.post-time {
    color: #666;
}

.post-categories {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.post-category {
    padding: 4px 12px;
    background: #f0f0f0;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    transition: all 0.2s;
}

.post-category:hover {
    background: #0073aa;
    color: #fff;
}

.post-title {
    font-size: 32px;
    margin: 0;
    line-height: 1.2;
    color: #333;
}

.post-author-line {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.2;
    padding: 10px;
    background: #f8f8f8;
    border-radius: 6px;
    border-bottom: 1px solid #ddd;
}

.post-author-line .author-avatar-link {
    display: block;
    line-height: 0;
}

.post-author-line .author-avatar-link img {
    border-radius: 50%;
    width: 40px;
    height: 40px;
    transition: opacity 0.2s;
}

.post-author-line .author-avatar-link:hover img {
    opacity: 0.8;
}

.post-author-line .author-name-link {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
    margin-left: 4px;
}

.post-author-line .author-name-link:hover {
    color: #0073aa;
}

.post-author-line .separator {
    color: #999;
}

.post-author-line .post-category-inline {
    color: #0073aa;
    text-decoration: none;
    transition: color 0.2s;
}

.post-author-line .post-category-inline:hover {
    color: #005a87;
}

.post-title {
    font-size: 32px;
    margin: 0;
    line-height: 1.2;
    color: #333;
}

/* Featured Image */
.post-featured-image {
    margin: 10px 0;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Post Content */
.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: #333;
    margin: 10px 0;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

/* Product Details */
.product-details {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.product-price,
.product-type {
    margin-bottom: 15px;
    font-size: 16px;
}

.product-price strong,
.product-type strong {
    color: #333;
}

.product-price {
    font-size: 24px;
    color: #28a745;
}

.product-download {
    margin-top: 20px;
}

.download-btn {
    display: inline-block;
    padding: 10px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
}

.download-btn:hover {
    background: #218838;
}

/* Product Gallery */
.product-gallery {
    margin-top: 30px;
}

.product-gallery h3 {
    margin-bottom: 15px;
    color: #333;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    display: block;
    border-radius: 8px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Comments Section */
.post-comments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #eee;
}

.post-comments h2,
.post-comments h3 {
    margin-bottom: 20px;
    color: #333;
}

.post-comments .comment-list {
    list-style: none;
    padding: 0;
}

.post-comments .comment {
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.post-comments .comment-author {
    font-weight: 600;
    margin-bottom: 10px;
}

.post-comments .comment-form {
    margin-top: 30px;
}

.post-comments .comment-form input[type="text"],
.post-comments .comment-form input[type="email"],
.post-comments .comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
}

.post-comments .comment-form input[type="submit"] {
    padding: 10px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.post-comments .comment-form input[type="submit"]:hover {
    background: #005a87;
}

/* Responsive */
@media (max-width: 768px) {
    .scdev-single-post {
        padding: 10px;
    }
    
    .post-title {
        font-size: 28px;
    }
    
    .post-author-line {
        flex-wrap: wrap;
        font-size: 13px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Night Mode */
body.night-mode .scdev-single-post {
    background: #2a2a2a;
    color: #e0e0e0;
}

body.night-mode .post-header {
    border-bottom-color: #444;
}

body.night-mode .post-title {
    color: #e0e0e0;
}

body.night-mode .post-meta {
    color: #999;
}

body.night-mode .post-author .author-name {
    color: #e0e0e0;
}

body.night-mode .post-time {
    color: #999;
}

body.night-mode .post-category {
    background: #333;
    color: #5dade2;
}

body.night-mode .post-category:hover {
    background: #5dade2;
    color: #fff;
}

body.night-mode .post-author-line {
    background: #333;
    border-bottom-color: #555;
}

body.night-mode .post-author-line .author-name-link {
    color: #e0e0e0;
}

body.night-mode .post-author-line .author-name-link:hover {
    color: #5dade2;
}

body.night-mode .post-author-line .post-category-inline {
    color: #5dade2;
}

body.night-mode .post-author-line .post-category-inline:hover {
    color: #85c1e9;
}

body.night-mode .post-title {
    color: #e0e0e0;
}

body.night-mode .post-content {
    color: #e0e0e0;
}

body.night-mode .product-details {
    background: #333;
}

body.night-mode .post-comments {
    border-top-color: #444;
}

body.night-mode .scdev-comment-box-open {
    background: #333 !important;
}

body.night-mode .scdev-comment-box-open h3 {
    color: #e0e0e0;
}

body.night-mode .scdev-comment-input {
    background: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #555 !important;
}

body.night-mode .scdev-comment-submit {
    background: #3498db !important;
}

body.night-mode .scdev-comment-submit:hover {
    background: #2980b9 !important;
}


/* Reactions */
.post-reactions {
    margin: 30px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.reactions-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.reaction-btn:hover {
    transform: scale(1.1);
    border-color: #0073aa;
}

.reaction-btn.reacted {
    transform: scale(1.2);
    background: #0073aa;
    border-color: #0073aa;
}

.reaction-btn.reacted .reaction-count {
    color: #fff;
}

.reaction-icon {
    font-size: 24px;
}

.reaction-count {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.reaction-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* Blog Featured Image - 200px height at top */
.blog-featured-image {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

.blog-featured-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}


/* WordPress Gallery Styling */
.wp-block-gallery,
.blocks-gallery-grid,
.gallery {
    display: grid !important;
    gap: 10px;
    list-style: none !important;
    padding: 0 !important;
    margin: 10px 0 !important;
}

/* 2 images - side by side */
.wp-block-gallery.gallery-columns-2,
.blocks-gallery-grid.columns-2,
.gallery.gallery-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery.gallery-columns-2 .gallery-item img {
    height: 250px;
    object-fit: cover;
}

/* 3 images - 1 big, 2 small */
.wp-block-gallery.gallery-columns-3,
.blocks-gallery-grid.columns-3,
.gallery.gallery-columns-3 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery.gallery-columns-3 .gallery-item:first-child {
    grid-column: 1 / -1;
}

.gallery.gallery-columns-3 .gallery-item:first-child img {
    height: 400px;
    object-fit: cover;
}

.gallery.gallery-columns-3 .gallery-item:not(:first-child) img {
    height: 200px;
    object-fit: cover;
}

/* 4 images - 2x2 grid */
.wp-block-gallery.gallery-columns-4,
.blocks-gallery-grid.columns-4,
.gallery.gallery-columns-4 {
    grid-template-columns: repeat(2, 1fr);
}

.gallery.gallery-columns-4 .gallery-item img {
    height: 250px;
    object-fit: cover;
}

/* Default for other counts */
.wp-block-gallery:not(.gallery-columns-2):not(.gallery-columns-3):not(.gallery-columns-4),
.blocks-gallery-grid:not(.columns-2):not(.columns-3):not(.columns-4),
.gallery:not(.gallery-columns-2):not(.gallery-columns-3):not(.gallery-columns-4) {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wp-block-gallery .blocks-gallery-item img,
.blocks-gallery-grid .blocks-gallery-item img,
.gallery .gallery-item img {
    width: 100%;
}

.gallery-caption,
.wp-caption-text {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    text-align: center;
}

/* Night Mode */
body.night-mode .gallery-caption,
body.night-mode .wp-caption-text {
    color: #999;
}
