/* Blog Popup Modal Styles */
.blog-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.blog-popup-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.blog-popup-container {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    border-radius: 20px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: popupSlideIn 0.4s ease-out;
}

@keyframes popupSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.blog-popup-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.blog-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.blog-popup-close i {
    font-size: 18px;
}

.blog-popup-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.blog-popup-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.blog-popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.blog-popup-meta {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 40px 30px 30px;
    z-index: 2;
    color: #fff;
}

.blog-popup-category {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #4a6cf7 100%);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.blog-popup-title {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 15px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.blog-popup-author-date {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    opacity: 0.9;
}

.blog-popup-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-popup-author::before {
    content: "👤";
    font-size: 16px;
}

.blog-popup-date {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog-popup-date::before {
    content: "📅";
    font-size: 16px;
}

.blog-popup-body {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    background: #fff;
    max-height: 60vh;
    min-height: 300px;
}

.blog-popup-excerpt {
    font-size: 18px;
    font-weight: 500;
    color: #4a6cf7;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 12px;
    border-left: 4px solid #4a6cf7;
    line-height: 1.6;
}

.blog-popup-content-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.blog-popup-content-text p {
    margin-bottom: 20px;
}

.blog-popup-content-text h1,
.blog-popup-content-text h2,
.blog-popup-content-text h3,
.blog-popup-content-text h4,
.blog-popup-content-text h5,
.blog-popup-content-text h6 {
    color: #2d3748;
    margin: 25px 0 15px 0;
    font-weight: 600;
}

.blog-popup-content-text ul,
.blog-popup-content-text ol {
    margin: 15px 0;
    padding-left: 25px;
}

.blog-popup-content-text li {
    margin-bottom: 8px;
}

.blog-popup-content-text blockquote {
    border-left: 4px solid #4a6cf7;
    padding: 15px 20px;
    margin: 20px 0;
    background: #f8f9ff;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.blog-popup-footer {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 25px 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-popup-social h5 {
    color: #fff;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.social-share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-share-btn.facebook {
    background: linear-gradient(135deg, #1877f2 0%, #42a5f5 100%);
    color: #fff;
}

.social-share-btn.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #42a5f5 100%);
    color: #fff;
}

.social-share-btn.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
    color: #fff;
}

.social-share-btn.copy {
    background: linear-gradient(135deg, #667eea 0%, #4a6cf7 100%);
    color: #fff;
}

.social-share-btn i {
    font-size: 16px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .blog-popup-overlay.active {
        padding: 10px;
    }
    
    .blog-popup-container {
        max-height: 95vh;
        border-radius: 15px;
    }
    
    .blog-popup-header {
        height: 250px;
    }
    
    .blog-popup-meta {
        padding: 30px 20px 20px;
    }
    
    .blog-popup-title {
        font-size: 22px;
    }
    
    .blog-popup-body {
        padding: 20px;
        max-height: 50vh;
        min-height: 250px;
    }
    
    .blog-popup-footer {
        padding: 20px;
    }
    
    .social-share-buttons {
        gap: 8px;
    }
    
    .social-share-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .social-share-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .blog-popup-title {
        font-size: 20px;
    }
    
    .blog-popup-excerpt {
        font-size: 16px;
        padding: 15px;
    }
    
    .blog-popup-content-text {
        font-size: 14px;
    }
    
    .scroll-to-top-btn {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 16px;
    }
}

/* Scrollbar Styling */
.blog-popup-body::-webkit-scrollbar {
    width: 8px;
}

.blog-popup-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    margin: 10px 0;
}

.blog-popup-body::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #4a6cf7 100%);
    border-radius: 4px;
    border: 1px solid #f1f1f1;
}

.blog-popup-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #4a6cf7 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Scroll indicator */
.blog-popup-body::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 20px;
    background: linear-gradient(transparent, rgba(255,255,255,0.8));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-popup-body.scrollable::after {
    opacity: 1;
}

/* Scroll to top button */
.scroll-to-top-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #4a6cf7 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.scroll-to-top-btn:hover {
    transform: translateY(0) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
