/* Single Post Wrapper */
.content-inner {
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

.scdev-single-post-wrapper {
    display: block;
    max-width: 900px;
    width: 100%;
    margin: 0 auto !important;
    padding: 0 20px !important;
    overflow-y: visible;
    min-height: 100%;
}

.scdev-single-post {
    width: 100%;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
   /* box-shadow: 0 2px 8px rgba(0,0,0,0.1); */
}

body.single-scdev_blog .entry-meta-top,
body.single-scdev_blog .entry-title,
body.single-scdev_blog .scdev-post-banner-wrap,
body.single-scdev_regular .scdev-post-banner-wrap {
    display: none !important;
}

/* Remove padding for featured image - let it be full width */
.scdev-single-post .blog-featured-image {
    margin-left: -20px !important;
    margin-right: -20px !important;
    margin-top: -20px !important;
    width: calc(100% + 40px) !important;
    max-width: none !important;
    border-radius: 8px 8px 0 0 !important;
    overflow: hidden;
}

.scdev-single-post .blog-featured-image-clickable {
    cursor: zoom-in;
}

.scdev-single-post .blog-featured-image-clickable img {
    cursor: zoom-in;
}

/* Post Header */
.post-header {
    padding: 20px 0 20px 0;
    margin: 0 0 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 8px;
}

.scdev-post-meta-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.scdev-post-meta h3.author-name,
.scdev-post-meta h3.scdev-post-author {
    margin: 0 !important;
    font-size: var(--scdev-h3-size, 18px);
    font-weight: var(--scdev-h3-weight, 700);
    line-height: 1.2;
}

.scdev-post-meta h6.post-time,
.scdev-post-meta h6.scdev-post-time {
    margin: 0 !important;
    font-size: var(--scdev-h6-size, 13px);
    font-weight: var(--scdev-h6-weight, 400);
    line-height: 1.2;
}

.scdev-single-entry-title {
    font-size: 32px;
    line-height: 1.15;
    margin: 12px 0 0;
    color: #333;
}

.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: #7b7b7c;
}

.post-time {
    color: #666;
}

.post-categories {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.post-category {
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
    font-weight: 500;
    transition: all 0.2s;
}

.post-category:hover {
    background: #0073aa;
    color: #fff;
}

.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: 48px;
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    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;
}

.scdev-post-links {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0 0;
    flex-wrap: wrap;
}

.scdev-post-link {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.scdev-post-link:hover {
    background: #fafafa;
    border-color: #cfcfcf;
}

.scdev-post-link-thumb {
    width: var(--scdev-post-nav-thumb-size, 75px);
    height: var(--scdev-post-nav-thumb-size, 75px);
    flex: 0 0 var(--scdev-post-nav-thumb-size, 75px);
    border-radius: 8px;
    overflow: hidden;
    background: #f1f3f5;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.scdev-post-link-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scdev-post-link-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.scdev-post-link-next {
    text-align: right;
    flex-direction: row-reverse;
}

.scdev-post-link-next .scdev-post-link-body {
    align-items: flex-end;
}

.scdev-post-link-no-thumb {
    gap: 0;
}

.scdev-post-link-no-thumb .scdev-post-link-body {
    flex: 1 1 100%;
}

.scdev-post-link-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #666;
    line-height: 1.1;
}

.scdev-post-link-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #222;
    word-break: break-word;
}

body.dark-mode .scdev-post-links,
body.dark .scdev-post-links,
body.night-mode .scdev-post-links,
body[data-theme="dark"] .scdev-post-links,
html.dark-mode .scdev-post-links,
html.dark .scdev-post-links,
html[data-theme="dark"] .scdev-post-links,
html[data-scdev-dark="true"] .scdev-post-links {
    color: #e0e0e0;
}

body.dark-mode .scdev-post-link,
body.dark .scdev-post-link,
body.night-mode .scdev-post-link,
body[data-theme="dark"] .scdev-post-link,
html.dark-mode .scdev-post-link,
html.dark .scdev-post-link,
html[data-theme="dark"] .scdev-post-link,
html[data-scdev-dark="true"] .scdev-post-link {
    background: #2a2a36;
    border-color: #404052;
    color: #f1f3f8;
    box-shadow: none;
}

body.dark-mode .scdev-post-link-thumb,
body.dark .scdev-post-link-thumb,
body.night-mode .scdev-post-link-thumb,
body[data-theme="dark"] .scdev-post-link-thumb,
html.dark-mode .scdev-post-link-thumb,
html.dark .scdev-post-link-thumb,
html[data-theme="dark"] .scdev-post-link-thumb,
html[data-scdev-dark="true"] .scdev-post-link-thumb {
    background: #1f2230;
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 768px) {
    .scdev-post-link {
        --scdev-post-nav-thumb-size: 60px !important;
        gap: 6px;
        padding: 4px 8px;
    }

    .scdev-post-link-title {
        font-size: 13px;
    }
}

body.dark-mode .scdev-post-link:hover,
body.dark .scdev-post-link:hover,
body.night-mode .scdev-post-link:hover,
body[data-theme="dark"] .scdev-post-link:hover,
html.dark-mode .scdev-post-link:hover,
html.dark .scdev-post-link:hover,
html[data-theme="dark"] .scdev-post-link:hover,
html[data-scdev-dark="true"] .scdev-post-link:hover {
    background: #313142;
    border-color: #595972;
}

body.dark-mode .scdev-post-link-label,
body.dark .scdev-post-link-label,
body.night-mode .scdev-post-link-label,
body[data-theme="dark"] .scdev-post-link-label,
html.dark-mode .scdev-post-link-label,
html.dark .scdev-post-link-label,
html[data-theme="dark"] .scdev-post-link-label,
html[data-scdev-dark="true"] .scdev-post-link-label {
    color: #b8bfd0;
}

body.dark-mode .scdev-post-link-title,
body.dark .scdev-post-link-title,
body.night-mode .scdev-post-link-title,
body[data-theme="dark"] .scdev-post-link-title,
html.dark-mode .scdev-post-link-title,
html.dark .scdev-post-link-title,
html[data-theme="dark"] .scdev-post-link-title,
html[data-scdev-dark="true"] .scdev-post-link-title {
    color: #f1f3f8;
}

.scdev-single-post-ad-slot {
    margin: 16px 0 0;
    padding: 6px 12px;
    background: transparent;
    border-top: 1px solid #e7e7e7;
    color: #444;
    line-height: 1.1;
}

/* WordPress Image Alignment Classes */
.post-content .aligncenter,
.post-content img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.post-content .alignleft,
.post-content img.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.post-content .alignright,
.post-content img.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.post-content .alignnone,
.post-content img.alignnone {
    display: block;
    margin: 20px 0;
}

/* WordPress Caption Alignment */
.post-content .wp-caption {
    max-width: 100%;
}

.post-content .wp-caption.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.post-content .wp-caption.alignleft {
    float: left;
    margin: 0 20px 20px 0;
}

.post-content .wp-caption.alignright {
    float: right;
    margin: 0 0 20px 20px;
}

.post-content .wp-caption img {
    display: block;
    margin: 0;
}

.post-content .wp-caption-text {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    text-align: center;
}

.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-wrapper {
        padding: 0 10px !important;
    }
    
    .scdev-single-post {
        padding: 10px;
    }
    
    /* Adjust featured image negative margins for mobile */
    .scdev-single-post .blog-featured-image {
        margin-left: -10px !important;
        margin-right: -10px !important;
        margin-top: -10px !important;
        width: calc(100% + 20px) !important;
    }
    
    .post-title {
        font-size: 36px;
        font-weight: 900;
    }
    
    .post-author-line {
        flex-wrap: wrap;
        font-size: 13px;
    }
    
    .post-meta {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px;
    }

    .scdev-post-links {
        flex-direction: column;
    }

    .scdev-post-link {
        flex-basis: 100%;
    }

    .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-meta {
    background: #333;
}

body.night-mode .post-title {
    color: #e0e0e0;
}

body.night-mode .post-meta {
    color: #999;
}

body.night-mode .post-author .author-name {
    color: #999;
}

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: #999;
}

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-single-post .post-author-line .post-author .author-name,
body.night-mode .scdev-single-post .post-author-line .post-time,
body.night-mode .scdev-single-post .post-author .author-name,
body.night-mode .scdev-single-post .post-author-line .author-name-link {
    color: #999 !important;
}

body.night-mode .scdev-comment-submit {
    background: #3498db !important;
}

body.night-mode .scdev-comment-submit:hover {
    background: #2980b9 !important;
}

body.night-mode .scdev-single-post-ad-slot {
    border-top-color: rgba(255, 255, 255, 0.12);
    color: #e0e0e0;
}


/* 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 — height controlled by Composer settings */
.blog-featured-image {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
}

.blog-featured-image img {
    width: 100%;
    height: 350px; /* default — overridden by scdev_composer wp_head dynamic CSS */
    object-fit: cover;
    display: block;
    border-radius: 8px 8px 0 0;
}

.blog-featured-gradient {
    width: 100%;
    height: 350px;
    background: linear-gradient(135deg, #8b9ee8 0%, #a88bc4 100%);
    display: block;
    border-radius: 8px 8px 0 0;
}


/* 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;
}
