/* NKSP Single Post Layout - Complete Styles */
.nksp-single-wrapper {
    width: 100%;
    background: #fff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    overflow: visible !important;
}

/* Container Layout - STICKY FIX */
.nksp-container {
    display: flex !important;
    gap: 40px;
    max-width: 1200px;
    margin: 30px auto !important;
    padding: 0 20px;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
    overflow: visible !important;
}

.nksp-main-content {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    overflow: visible !important;
}

/* SIDEBAR STICKY - GUARANTEED WORKING */
.nksp-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 20px !important;
    align-self: flex-start;
    height: fit-content;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    z-index: 99;
}

/* BREAK STICKY KILLERS */
body, html, .site, .site-content, .elementor, .elementor-section, .elementor-container, 
.elementor-row, .elementor-column, .elementor-widget-wrap {
    overflow: visible !important;
    transform: none !important;
    height: auto !important;
}

/* Article Header */
.nksp-article {
    padding: 0;
}

.nksp-entry-header {
    margin-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.nksp-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.nksp-meta {
    font-size: 0.95rem;
    color: #666;
}

.nksp-date, .nksp-author {
    font-weight: 500;
}

/* Featured Image */
.nksp-featured-image {
    margin: 30px 0;
    border-radius: 8px;
    overflow: hidden;
}

.nksp-featured-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Post Content */
.nksp-content {
    font-size: 1.125rem;
    color: #333;
    line-height: 1.8;
}

.nksp-content p {
    margin-bottom: 1.5em;
}

.nksp-content h2 {
    font-size: 1.75rem;
    margin: 2em 0 1em 0;
    color: #1a1a1a;
}

.nksp-content h3 {
    font-size: 1.5rem;
    margin: 1.5em 0 0.75em 0;
    color: #1a1a1a;
}

/* You May Also Like Section */
.nksp-you-may-also {
    margin: 60px 0 40px 0;
    padding: 40px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.nksp-section-header {
    text-align: center;
    margin-bottom: 30px;
}

.nksp-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 8px 0;
}

.nksp-section-subtitle {
    font-size: 1rem;
    color: #64748b;
    margin: 0;
}

.nksp-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.nksp-related-item {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.nksp-related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #007acc;
}

.nksp-related-link {
    text-decoration: none;
    color: inherit;
}

.nksp-related-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.4;
}

/* Social Share Section */
.nksp-social-share {
    margin: 50px 0 30px 0;
    padding: 30px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.nksp-share-header {
    text-align: center;
    margin-bottom: 25px;
}

.nksp-share-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nksp-share-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.nksp-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.nksp-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.nksp-share-fb:hover { background: #1877f2; color: white; border-color: #1877f2; }
.nksp-share-in:hover { background: #0a66c2; color: white; border-color: #0a66c2; }
.nksp-share-pin:hover { background: #e60023; color: white; border-color: #e60023; }
.nksp-share-email:hover { background: #ea4335; color: white; border-color: #ea4335; }
.nksp-share-copy:hover { background: #10b981; color: white; border-color: #10b981; }

.nksp-share-icon {
    font-size: 1.1rem;
}

/* ===== SIDEBAR STYLES ===== */

.nksp-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Widget Common Styles */
.nksp-widget {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.nksp-widget:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nksp-widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #007acc;
    position: relative;
}

.nksp-widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 40px;
    height: 2px;
    background: #007acc;
}

/* Widget Lists */
.nksp-widget-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nksp-list-item {
    padding: 0;
    margin: 0;
}

.nksp-list-link {
    display: block;
    padding: 12px 0;
    text-decoration: none;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
}

.nksp-list-link:hover {
    color: #007acc;
    transform: translateX(5px);
    border-bottom-color: #007acc;
}

.nksp-list-link::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #007acc;
}

.nksp-list-link:hover::before {
    opacity: 1;
    left: -12px;
}

.nksp-list-title {
    font-weight: 500;
    line-height: 1.4;
    display: block;
}

.nksp-no-items {
    color: #94a3b8;
    font-style: italic;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

/* Newsletter Widget - FIXED ALIGNMENT */
.nksp-newsletter-content {
    text-align: center;
}

.nksp-newsletter-text {
    color: #475569;
    margin-bottom: 20px;
    line-height: 1.5;
    text-align: center;
}

.nksp-newsletter-form {
    margin-bottom: 15px;
    padding: 0 10px;
}

.nksp-form-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 10px;
}

.nksp-form-input {
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-align: center;
}

.nksp-form-input:focus {
    outline: none;
    border-color: #007acc;
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.1);
}

.nksp-form-submit {
    padding: 12px 20px;
    background: #007acc;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: center;
}

.nksp-form-submit:hover {
    background: #005a9e;
    transform: translateY(-1px);
}

.nksp-newsletter-note {
    font-size: 0.85rem;
    color: #94a3b8;
    margin: 0;
    text-align: center;
}

/* Follow Us Widget */
.nksp-follow-content {
    text-align: center;
}

.nksp-follow-text {
    color: #475569;
    margin-bottom: 20px;
    text-align: center;
}

.nksp-social-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.nksp-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nksp-social-link:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.nksp-social-fb:hover { background: #1877f2; color: white; border-color: #1877f2; }
.nksp-social-tw:hover { background: #1da1f2; color: white; border-color: #1da1f2; }
.nksp-social-in:hover { background: #0a66c2; color: white; border-color: #0a66c2; }
.nksp-social-pt:hover { background: #e60023; color: white; border-color: #e60023; }

.nksp-social-icon {
    font-size: 1.1rem;
}

.nksp-social-text {
    font-size: 0.9rem;
}

/* Ads Widget */
.nksp-ads-content {
    text-align: center;
}

.nksp-ad-space {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 40px 20px;
    color: #94a3b8;
}

.nksp-ad-label {
    display: block;
    margin-top: 10px;
    font-size: 0.8rem;
    color: #cbd5e1;
}

/* Newsletter Form States */
.nksp-form-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: nksp-spin 1s linear infinite;
}

@keyframes nksp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Messages */
.nksp-form-messages {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.nksp-message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.nksp-message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.nksp-message-text {
    display: block;
    text-align: center;
}

/* ==================== */
/* MOBILE RESPONSIVE - SIDEBAR HIDDEN */
/* ==================== */

@media (max-width: 1024px) {
    .nksp-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 15px;
    }
    
    .nksp-sidebar {
        width: 100%;
        position: static;
        order: 2;
        max-height: none;
        display: block !important; /* Show on tablet */
    }
    
    .nksp-main-content {
        order: 1;
    }
    
    .nksp-title {
        font-size: 2rem;
    }
    
    .nksp-related-grid {
        grid-template-columns: 1fr;
    }
    
    .nksp-share-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nksp-share-btn {
        width: 200px;
        justify-content: center;
    }
    
    .nksp-sidebar-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .nksp-widget {
        margin-bottom: 0;
    }
}



/* MOBILE DEVICES - HIDE SIDEBAR */
@media (max-width: 768px) {
    .nksp-sidebar {
        display: none !important; /* Hide sidebar on mobile */
    }
    
    .nksp-container {
        flex-direction: column;
        gap: 0;
    }
    
    .nksp-main-content {
        width: 100%;
    }
    
    .nksp-you-may-also,
    .nksp-social-share {
        padding: 25px 20px;
        margin: 40px 0 30px 0;
    }
    
    .nksp-title {
        font-size: 1.75rem;
    }
    
    .nksp-content {
        font-size: 1rem;
    }
    
    .nksp-sidebar-inner {
        grid-template-columns: 1fr;
    }
    
    .nksp-social-links {
        grid-template-columns: 1fr;
    }
    
    .nksp-widget {
        padding: 20px;
    }
    
    .nksp-newsletter-form {
        padding: 0 5px;
    }
}

/* EXTRA SMALL MOBILE */
@media (max-width: 480px) {
    .nksp-sidebar {
        display: none !important;
    }
    
    .nksp-container {
        padding: 0 10px;
    }
    
    .nksp-title {
        font-size: 1.5rem;
    }
    
    .nksp-you-may-also,
    .nksp-social-share {
        padding: 20px 15px;
        margin: 30px 0 20px 0;
    }
}