﻿.container {
    margin-top: 4rem;
}

/* New Styles for Share and Like Buttons */
.blog-media-section {
    display: flex;
    align-items: flex-start; /* Align share bar to the top of the image */
    gap: 20px; /* Space between image and share bar */
    margin-bottom: 24px; /* Space below the entire media section */
    justify-content: center; /* Center the image and share bar together */
    min-height: 25rem;
    position: relative;
}

.blog-image-wrapper {
    flex-shrink: 1; /* Allow image to shrink if needed */
    max-width: 70%; /* Limit image width to allow space for share bar */
    text-align: center;
}

    .blog-image-wrapper img {
        max-height: 400px;
        object-fit: cover;
        width: 100%; /* Make image fill its wrapper */
        display: block; /* Remove extra space below image */
        margin: 0 auto; /* Center image within its wrapper */
    }

.share-bar-container {
    position: absolute; /* Remove sticky as it's now next to image, not scrolling with content */
    float: none;
    margin-right: 0;
    padding-top: 0; /* Remove top padding as it aligns with image */
    z-index: 1;
    right: -5%;
    /* top: 10%; */
    display: flex;
    flex-direction: row;
    align-items: start; /* Center horizontally */
    gap: 15px; /* Space between buttons */
    padding: 10px; /* Add some padding around the buttons themselves */
    border-radius: 8px; /* Slightly rounded container */
    background-color: #f8f9fa; /* Light background for the container */
    box-shadow: 0 0 10px rgba(0,0,0,0.05); /* Subtle shadow */
}

.share-bar-con-wrapper {
    display: grid;
    gap: 1rem;
}

.share-main-button {
    background-color: #28a745;
    color: white;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

    .share-main-button:hover {
        background-color: #218838;
        transform: scale(1.05);
    }

.share-icons-expanded {
    display: none; /* Hidden by default */
    flex-direction: column;
    gap: 10px;
}

.share-icon {
    background-color: #f0f0f0;
    color: #555;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

    .share-icon:hover {
        transform: scale(1.05);
    }

    .share-icon.facebook:hover {
        background-color: #1877f2;
        color: white;
    }

    .share-icon.twitter:hover {
        background-color: #1da1f2;
        color: white;
    }

    .share-icon.linkedin:hover {
        background-color: #0a66c2;
        color: white;
    }

    .share-icon.whatsapp:hover {
        background-color: #25d366;
        color: white;
    }

    .share-icon.email:hover {
        background-color: #dc3545;
        color: white;
    }

.like-button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.like-icon {
    font-size: 1.8rem;
    color: #ff6b81;
    transition: transform 0.2s ease-in-out, color 0.2s ease-in-out;
}

    .like-icon.liked {
        color: #e0245e;
        transform: scale(1.1);
    }

    .like-icon:hover {
        transform: scale(1.1);
    }

.like-count {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-top: 5px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .like-count.liked {
        color: #e0245e;
    }

.views-counter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

    .views-counter i {
        font-size: .8rem;
        color: #adb5bd;
    }

/* Remove previous float adjustment */
.blog-main-content {
    position: relative;
    overflow: visible; /* Reset this as no longer floating next to it */
    width: 100%; /* Take full width below the image section */
}

/* Responsive adjustments */
@@media (max-width: 992px) { /* Adjust breakpoint for larger tablets/smaller desktops */
    .blog-media-section {
        flex-direction: column; /* Stack image and share bar vertically */
        align-items: center; /* Center them */
        gap: 20px;
    }

    .blog-image-wrapper {
        max-width: 100%; /* Image takes full width */
    }

    .share-bar-container {
        flex-direction: row; /* Share icons side-by-side on smaller screens */
        justify-content: center;
        width: 100%; /* Take full width */
        box-shadow: none; /* Less prominent on mobile */
        background-color: transparent;
        padding: 0;
    }

    .share-icons-expanded {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }
}
