/* Section Breadcrumbs */
.breadcrumb {
    margin: 0.5rem;
    color: var(--font-color);

    & a:hover {
        color: #f3d377;
    }
}

/* Section Share Icons */
.floating-share-icons {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    z-index: 1000;
    opacity: 0; /* Start with invisible */
    visibility: hidden; /* Make it invisible for better performance */
    transition: opacity 0.5s ease-in-out, visibility 0s 0.5s; /* Smooth fade and delay visibility change */
}

.floating-share-icons.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0s 0s; /* Reset the visibility delay */
}

.floating-share-icons a {
    width: 60px;
    height: 60px;
    color: var(--font-color);
    backdrop-filter: blur(3px);
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(60, 50, 70, 0.5);
    border-radius: 8px;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    overflow: hidden;
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.floating-share-icons a i {
    color: var(--font-color);
    position: relative;
    transition: transform 0.5s, color 0.5s;
}

.floating-share-icons a:hover i {
    transform: translateY(-5px);
    color: var(--font-color);
}

.floating-share-icons a::after {
    content: "Share";
    position: absolute;
    bottom: -40px;
    font-size: 0.8rem;
    color: var(--font-color);
    opacity: 0;
    transition: bottom 0.5s ease, opacity 0.5s ease;
}

.floating-share-icons a:hover::after {
    bottom: 2px;
    opacity: 1;
}

/* Section Blog Content */
.container {
    width: 75vw;
}

article {
    margin-bottom: 2rem;
}

.blog-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

pre {
   white-space: break-spaces !important;
}

.blog-content h3 {
    font-size: 2rem;
    text-align: center;
    margin: 2.5rem auto;
}

.blog-content img {
    width: 100%;
    aspect-ratio: 2.39 / 0.8;
    object-fit: cover;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--color-purple);
    margin-bottom: 1rem;
}

.blog-content-header {
    width: 75%;
    padding: 0.5rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    gap: 1rem;
    border-bottom: 1px solid var(--font-color);
    border-top: 1px solid var(--font-color);
}

.blog-content-header button {
    display: inline-flex;
    align-items: center;
    gap: 4px; /* Space between icon and text */
    font-size: 1rem; /* Match text size */
    border: none; /* Remove button border */
    background: none; /* Remove button background */
    color: inherit; /* Inherit text color */
    padding: 0;
    cursor: pointer;

    & i {
        color: darkred;
    }

    &:hover {
        text-decoration: underline;
        background-color: transparent;
    }

    &:hover i {
        animation: pulse-heart 0.3s ease-in-out infinite alternate;
    }
    
    &:focus {
        outline: none !important;
        border: none !important;
    }
}

.blog-content-header {
    & .btn, .btn-sm, .btn-outline-danger {
        &:focus {
            box-shadow: none;
        }
    }
}

@keyframes pulse-heart {
    0% {
        transform: scale(0.8);
    }
    100% {
        transform: scale(1);
    }
}

.blog-content-body {
    display: block; /* Ensures text flows naturally */
    padding: 2rem;
    text-align: justify;
    margin-bottom: 2rem;
}

/* Section Comments */
#comments {
    color: var(--font-color);

    & #author {
        color: var(--font-color);
        backdrop-filter: blur(3px);
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(60, 50, 70, 0.5);
        border-radius: 8px;
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    }

    & #content {
        color: var(--font-color);
        backdrop-filter: blur(3px);
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(60, 50, 70, 0.5);
        border-radius: 8px;
        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
    }
}

#comments form {
    display: flex;
    flex-direction: column;
}

.btn-comment {
    align-self: center;
    color: var(--font-color);
    transition: background-color 0.25s ease-in-out;
    font-size: 0.9rem !important;
    display: inline-flex; /* Make the link behave like a button */
    align-items: center; /* Vertically align content */
    justify-content: center; /* Horizontally center content */
    padding: .375rem .75rem; /* Add some padding for consistent button size */
    text-decoration: none; /* Remove underline from the <a> tag */
    border: 1px solid var(--color-opacity-light-1);
    cursor: pointer; /* Make it look clickable */
    background-color: #3D3145;
}

.btn-comment:hover {
    background-color: #332839;
    color: var(--font-color);
}

& .comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    & .comment {
        border: 2px solid var(--color-purple);
    }
}


/* Medium screens (tablets) */
@media (max-width: 1024px) {

    .blog-content-header {
        width: 100%;
        gap: 0.5rem;
    }
}

@media (max-width: 768px) {
    .updated-label {
        display: none;
    }

    .container {
        width: 85vw;
    }

    .blog-content {
        h3 {
            margin: 1rem auto;
            font-size: 1.5rem;
        }

        button span {
            font-size: 15px;
        }
    }

    .floating-share-icons {
        position: absolute; /* Change from fixed to absolute */
        left: 50%; /* Center it */
        top: auto; /* Reset top */
        bottom: 10px; /* Position it at the bottom */
        transform: translateX(-50%); /* Center horizontally */
        flex-direction: row; /* Change from column to row */
        gap: 1rem; /* Adjust gap for horizontal layout */
        z-index: 1;
    }
}
