:root {
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.blogContainer {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    flex-wrap: wrap;
    position: relative;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
    cursor: pointer;
    z-index: 100;
    transition: var(--transition);
    border: none;
    opacity: 0;
    transform: translateY(20px);
}

.fab.visible {
    opacity: 1;
    transform: translateY(0);
}

.fab:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(67, 97, 238, 0.5);
}

/* Header Styles */
.blog-header {
    width: 100%;
    padding: 10px 0 10px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    margin-bottom: 50px;
    border-radius: 0 0 20px 20px;
}

.blog-title {
    font-family: 'Poppins';
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    position: relative;
    display: inline-block;
    line-height: 1.3;
    padding:0px 10px;
}

.blog-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 30px;
    color: var(--gray-color);
    font-size: 0.95rem;
}

.blog-meta span {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.8);
    padding: 8px 15px;
    border-radius: 30px;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(5px);
}

.blog-meta i {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.blog-featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) scale(1);
    transition: var(--transition);
    border: 5px solid white;
}

.blog-featured-image:hover {
    transform: perspective(1000px) rotateX(1deg) rotateY(-1deg) scale(1.01);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Main Content Layout */
.main-content {
    flex: 0 0 70%;
    max-width: 70%;
    padding-right: 40px;
    position: relative;
}

.sidebar {
    flex: 0 0 30%;
    max-width: 30%;
    padding-left: 20px;
    position: sticky;
    top: 30px;
    height: fit-content;
    align-self: flex-start;
}

/* Blog Content Styles */
.blog-content {
    margin-bottom: 60px;
    position: relative;
}

.blog-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -30px;
    width: 3px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), rgba(67, 97, 238, 0));
    border-radius: 3px;
}

.blog-section {
    margin-bottom: 40px;
    position: relative;
    padding: 30px;
    border-radius: 15px;
    background-color: #fff;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-primary);
}

.blog-section:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.blog-section h2 {
    font-family: var(--font-secondary);
    color: var(--primary-dark);
    margin-bottom: 20px;
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.blog-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 3px;
}

.blog-section h3 {
    font-family: var(--font-secondary);
    color: var(--secondary-color);
    margin: 25px 0 15px;
    font-size: 1.5rem;
    position: relative;
    padding-left: 15px;
}

.blog-section h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: var(--accent-color);
    border-radius: 3px;
}

.blog-section p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
}

.blog-section ul, .blog-section ol {
    margin-bottom: 20px;
    padding-left: 25px;
}

.blog-section li {
    margin-bottom: 12px;
    position: relative;
    line-height: 1.7;
}

.blog-section ul li::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 10px;
    width: 8px;
    height: 8px;
    background-color: var(--accent-color);
    border-radius: 50%;
}

/* Audio Player Controls */
.audio-control {
    position: absolute;
    top: 25px;
    right: 25px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    z-index: 2;
}

.audio-control:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.audio-control.playing {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(67, 97, 238, 0); }
    100% { box-shadow: 0 0 0 0 rgba(67, 97, 238, 0); }
}

/* Action Buttons */
.blog-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    background: rgba(245, 247, 255, 0.9);
    backdrop-filter: blur(10px);
    z-index: 10;
    padding-top: 15px;
}

.action-buttons {
    display: flex;
    gap: 15px;
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.3); }
    28% { transform: scale(1); }
    42% { transform: scale(1.3); }
    70% { transform: scale(1); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-5px); }
}

/* Social Share Buttons - Fixed CSS */
.social-share {
    margin: 40px 0;
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 5; /* Ensure it stays above other elements */
}

.social-share h4 {
    margin-bottom: 20px;
    color: var(--gray-color);
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-share h4::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin-left: 10px;
}

.share-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.share-btn {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none; /* Added to fix button styling */
    cursor: pointer; /* Added for better UX */
    padding: 0; /* Reset padding */
}

.share-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 100%);
}

.share-btn i {
    position: relative; /* Ensure icon stays above gradient */
    z-index: 1;
}

.facebook {
    background-color: #3b5998;
}

.twitter {
    background-color: #1da1f2;
}

.linkedin {
    background-color: #0077b5;
}

.whatsapp {
    background-color: #25d366;
}

.share-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Comments Section */
.comments-section {
    margin: 60px 0;
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 5;
}

.comments-section h3 {
    font-family: var(--font-secondary);
    color: var(--dark-color);
    margin-bottom: 30px;
    font-size: 2rem;
    position: relative;
    padding-bottom: 15px;
}

.comments-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.comment-form {
    margin-bottom: 40px;
    background: var(--light-gray);
    padding: 25px;
    border-radius: 12px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    font-family: var(--font-primary);
    transition: var(--transition);
    background: white;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.comment-list {
    margin-top: 40px;
}

.comment {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.comment:last-child {
    border-bottom: none;
}

.comment-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
}

.comment-body {
    flex-grow: 1;
}

.comment-author {
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author::after {
    content: '•';
    color: var(--gray-color);
    font-weight: normal;
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.comment-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Sidebar Styles */
.sidebar-widget {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-widget:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.widget-title {
    font-family: var(--font-secondary);
    color: var(--dark-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    position: relative;
    padding-bottom: 10px;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.related-post {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    border-radius:10px;
}

.related-post:hover {
    transform: translateX(5px);
    box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
}

.related-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.related-post-img {
    width: 90px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    transition: var(--transition);
}

.related-post:hover .related-post-img {
    transform: scale(1.05);
}

.related-post-content {
    flex-grow: 1;
}

.related-post-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.related-post-title a {
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-title a:hover {
    color: var(--primary-color);
}

.related-post-date {
    font-size: 0.85rem;
    color: var(--gray-color);
    display: flex;
    align-items: center;
    gap: 5px;
}

.category-list {
    list-style: none;
}

.category-item {
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.category-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    transition: var(--transition);
}

.category-item:hover::before {
    width: 8px;
    background: var(--gradient-primary);
}

.category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--dark-color);
    text-decoration: none;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.02);
    transition: var(--transition);
}

.category-link:hover {
    background: rgba(67, 97, 238, 0.05);
    color: var(--primary-color);
    transform: translateX(5px);
}

.category-count {
    background-color: var(--light-gray);
    color: var(--gray-color);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
}

.category-link:hover .category-count {
    background-color: var(--primary-color);
    color: white;
}

.subscribe-form {
    margin-top: 25px;
}

.subscribe-form .form-group {
    margin-bottom: 20px;
}

.subscribe-form .form-control {
    width: 100%;
    padding: 12px 18px;
    border-radius: 8px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    font-family: var(--font-primary);
    transition: var(--transition);
}

.subscribe-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.2);
}

.subscribe-form .btn {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 1rem;
}

/* Trending Tags */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.tag:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* Navigation Buttons */
.blog-navigation {
    display: flex;
    justify-content: space-between;
    margin: 60px 0;
    gap: 20px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 25px;
    border-radius: 12px;
    background: white;
    color: var(--dark-color);
    text-decoration: none;
    transition: var(--transition);
    max-width: 48%;
    box-shadow: var(--box-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.nav-btn i {
    font-size: 1.5rem;
}

.nav-btn.prev-btn i {
    order: -1;
}

.nav-btn.next-btn {
    margin-left: auto;
    text-align: right;
}

.nav-text {
    flex-grow: 1;
}

.nav-title {
    font-weight: 600;
    margin-bottom: 5px;
    display: block;
}

.nav-direction {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    background: white;
    padding: 30px;
    border-radius: 15px;
    margin: 60px 0;
    box-shadow: var(--box-shadow);
    align-items: center;
}

.author-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid rgba(67, 97, 238, 0.1);
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.author-bio {
    color: var(--gray-color);
    margin-bottom: 15px;
    line-height: 1.7;
}

.author-social {
    display: flex;
    gap: 15px;
}

.author-social a {
    color: var(--gray-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.author-social a:hover {
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Floating Table of Contents - Fixed Positioning */
.floating-toc {
    position: fixed;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow);
    padding: 15px;
    z-index: 90;
    max-width: 250px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    max-height: 70vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) var(--light-gray);
}

/* Custom scrollbar for floating TOC */
.floating-toc::-webkit-scrollbar {
    width: 6px;
}

.floating-toc::-webkit-scrollbar-track {
    background: var(--light-gray);
    border-radius: 3px;
}

.floating-toc::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 3px;
}

.floating-toc.visible {
    opacity: 1;
    visibility: visible;
    left: 30px; /* Adjusted to prevent overlap */
}

/* Ensure TOC doesn't overlap on smaller screens */
@media (max-width: 1400px) {
    .floating-toc {
        left: 10px;
    }
    .floating-toc.visible {
        left: 20px;
    }
}

.toc-title {
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.toc-list {
    list-style: none;
}

.toc-item {
    margin-bottom: 10px;
}

.toc-link {
    color: var(--gray-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: block;
    padding: 5px 0;
    position: relative;
}

.toc-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.toc-link:hover, .toc-link.active {
    color: var(--primary-color);
    padding-left: 10px;
}

.toc-link:hover::before, .toc-link.active::before {
    width: 5px;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 100;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    transition: width 0.1s ease;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .blog-title {
        font-size: 2.5rem;
    }

    .main-content {
        padding-right: 30px;
    }

    .floating-toc {
        display: none;
    }
}

@media (max-width: 992px) {
    .main-content, .sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0;
    }

    .sidebar {
        margin-top: 50px;
        position: static;
    }

    .blog-featured-image {
        height: 400px;
    }

    .blog-content::before {
        display: none;
    }

    .blog-navigation {
        flex-direction: column;
    }

    .nav-btn {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .blog-header {
        padding: 60px 0 30px;
    }

    .blog-title {
        font-size: 2rem;
    }

    .blog-featured-image {
        height: 300px;
    }

    .blog-meta {
        gap: 15px;
    }

    .blog-meta span {
        padding: 6px 12px;
    }

    .blog-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .blog-section {
        padding: 25px;
    }

    .blog-section h2 {
        font-size: 1.7rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
    }

    .author-social {
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 20px;
    }

    .blog-title {
        font-size: 1.8rem;
    }

    .blog-meta {
        font-size: 0.85rem;
        gap: 10px;
    }

    .blog-featured-image {
        height: 250px;
    }

    .blog-section h2 {
        font-size: 1.5rem;
    }

    .blog-section h3 {
        font-size: 1.3rem;
    }

    .comment {
        flex-direction: column;
    }

    .comment-avatar {
        margin-bottom: 15px;
    }

    .fab {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
        bottom: 20px;
        right: 20px;
    }

    .social-share {
        padding: 20px;
    }

    .share-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}