/* ================================
   Blog Single Page Styles
   Consign Tech Theme
   ================================ */

/* ================================
   Fade-Up Animation Styles
   FIXED: Separated fade animations from other transitions
   ================================ */

/* Base animation state - hidden initially */
/* FIXED: Removed transition from base state to prevent conflicts */
.blog-single-page .fade-up {
    opacity: 0;
    transform: translateY(30px);
}

/* Animated state - visible */
/* FIXED: Animation applied only when animated class is added */
.blog-single-page .fade-up.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Stagger delays - only apply when animating */
.blog-single-page .fade-up.animated.fade-up-delay-1 { transition-delay: 0.1s; }
.blog-single-page .fade-up.animated.fade-up-delay-2 { transition-delay: 0.2s; }
.blog-single-page .fade-up.animated.fade-up-delay-3 { transition-delay: 0.3s; }
.blog-single-page .fade-up.animated.fade-up-delay-4 { transition-delay: 0.4s; }

/* Hero animation keyframe */
@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================================
   Hero Section
   ================================ */
.blog_single_hero {
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    position: relative;
    text-align: center;
    width: 100%;
    padding: 300px 0px;
}

.blog_single_hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background: linear-gradient(to bottom, transparent, #ffffff);
    pointer-events: none;
}

.blog_single_hero_container {
    max-width: 1280px;
    margin: 0 auto;
}

.blog_single_hero_content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

/* Hide hero elements initially */
.blog_single_hero .blog_single_category_badge,
.blog_single_hero .blog_single_title,
.blog_single_hero .blog_single_excerpt,
.blog_single_hero .blog_single_meta {
    opacity: 0;
    transform: translateY(30px);
}

/* Animate hero elements on page load */
.blog_single_hero .blog_single_category_badge {
    animation: heroFadeUp 0.7s ease-out 0.1s forwards;
}

.blog_single_hero .blog_single_title {
    animation: heroFadeUp 0.7s ease-out 0.2s forwards;
}

.blog_single_hero .blog_single_excerpt {
    animation: heroFadeUp 0.7s ease-out 0.35s forwards;
}

.blog_single_hero .blog_single_meta {
    animation: heroFadeUp 0.7s ease-out 0.5s forwards;
}

/* Category Badge */
.blog_single_category_badge {
    display: inline-flex;
}

.blog_single_category_link {
    display: inline-flex;
    padding: 6px 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border-radius: 100px;
    color: #008BCB;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    transition: all 0.3s ease;
}

.blog_single_category_link a {
    color: #008BCB !important;
    text-decoration: none;
}

.blog_single_category_link a:hover {
    text-decoration: underline;
}

/* Title */
.blog_single_title {
    color: #0D1A3A;
    text-align: center;
    font-size: 40px;
    font-style: normal;
    font-weight: 600;
    line-height: 57.6px;
    max-width: 750px;
}

/* Excerpt */
.blog_single_excerpt {
    color: #0D1A3A;
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 30.4px;
    max-width: 700px;
}

/* Meta Info */
.blog_single_meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.blog_single_author_info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.blog_single_author_avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.blog_single_hero_details_text {
    color: #0D1A3A;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: 28.9px;
}

.blog_single_meta_divider {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9096A4;
}

/* ================================
   Featured Image Section
   ================================ */
.blog_single_featured_image_section {
    padding: 0 200px;
    margin-top: -10%;
}

.blog_single_featured_image_wrapper {
    width: 100%;
    height: 600px;
    padding: 5px;
    border-radius: 35px;
    border: 1px solid #EEE;
    box-shadow: 0 16px 32px 0 rgba(13, 26, 58, 0.12);
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeUp 0.7s ease-out 0.65s forwards;
}

.blog_single_featured_image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 32px;
}

/* ================================
   Content Section with Sidebar
   ================================ */
.blog_single_content_section {
    padding: 80px 200px;
}

.blog_single_content_container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 80px;
}

/* Left Section (Content + Author) */
.blog_single_left_section {
    flex: 1;
    min-width: 0;
}

/* Main Content */
.blog_single_content {
    min-width: 0;
}

.blog_single_content_inner {
    color: #3D4861;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.8;
}

/* FIXED: Add scroll-margin-top to headings for sticky navbar offset */
.blog_single_content_inner h2 {
    color: #0D1A3A;
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    line-height: 46.44px;
    margin: 64px 0 22px 0;
}

.blog_single_content_inner h2:first-child {
    margin-top: 0;
}

.blog_single_content_inner h3 {
    color: #0D1A3A;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.4;
    margin: 36px 0 16px 0;
    /* FIXED: Scroll offset for sticky navbar */
    scroll-margin-top: 120px;
}

.blog_single_content_inner p {
    color: #3D4861;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 30.4px;
}

.blog_single_content_inner strong {
    font-weight: 600;
}

.blog_single_content_inner p span {
    color: #3D4861;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 30.4px;
    /* text-decoration-line: underline; */
    text-decoration-style: solid;
    text-decoration-skip-ink: none;
    text-decoration-color: #F7B718 !important;
    text-decoration-thickness: 10%;
    text-underline-offset: 25%;
    text-underline-position: from-font;
}

.blog_single_content_inner a {
    color: #008BCB;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.3s ease;
}

.blog_single_content_inner a:hover {
    color: #006d9e;
}

.blog_single_content_inner ul,
.blog_single_content_inner ol {
    margin: 0 0 24px 0;
    padding-left: 24px;
}

.blog_single_content_inner li {
    margin-bottom: 12px;
}

.blog_single_content_inner blockquote {
    margin: 32px 0;
    padding: 24px 32px;
    border-left: 4px solid #008BCB;
    background: #F8FBFD;
    border-radius: 0 12px 12px 0;
    font-size: 18px;
    font-style: italic;
    color: #3D4861;
}

.blog_single_content_inner blockquote p:last-child {
    margin-bottom: 0;
}

.blog_single_content_inner img {
    height: 464px;
    width: 100%;
    border-radius: 16px;
    margin-top: 64px;
}

.blog_single_content_inner code {
    background: #F1F5F9;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: #0D1A3A;
}

.blog_single_content_inner pre {
    background: #1E293B;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 32px 0;
}

.blog_single_content_inner pre code {
    background: transparent;
    color: #E2E8F0;
    padding: 0;
}

/* Highlighted Text (for annotations) */
.blog_single_content_inner mark,
.blog_single_content_inner .highlight {
    background: linear-gradient(180deg, transparent 60%, rgba(0, 139, 203, 0.2) 60%);
    padding: 0 2px;
}

/* ================================
   Sidebar
   FIXED: Updated top position to account for sticky navbar
   ================================ */
.blog_single_sidebar {
    position: sticky;
    /* FIXED: Increased top value to account for sticky navbar height 
       Adjust this value to match your navbar height + desired spacing */
    top: 200px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    width: 320px;
    flex-shrink: 0;
    /* FIXED: Ensure sidebar doesn't exceed viewport height minus navbar */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    /* Hide scrollbar but allow scrolling */
    scrollbar-width: thin;
    scrollbar-color: #E5E7EB transparent;
}

.blog_single_sidebar::-webkit-scrollbar {
    width: 4px;
}

.blog_single_sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.blog_single_sidebar::-webkit-scrollbar-thumb {
    background-color: #E5E7EB;
    border-radius: 4px;
}

/* Table of Contents */
.blog_single_toc {
    display: flex;
    padding: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    align-self: stretch;
    border-radius: 16px;
    border: 1px solid #EEE;
    background: #FFF;
    backdrop-filter: blur(8px);
}

.blog_single_toc_title {
    color: #0D1A3A;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 28.8px;
}

.blog_divider {
    width: 100%;
    height: 1px;
    background: #EEE;
}

.blog_single_toc_nav {
    max-height: 300px;
    overflow-y: auto;
}

.blog_single_toc_list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog_single_toc_item {
    margin-bottom: 8px;
}

.blog_single_toc_item.level-3 {
    padding-left: 16px;
}

.blog_single_toc_link {
    display: block;
    color: #5D667B;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none !important;
    padding: 6px 12px;
    margin: 8px 0;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: all 0.3s ease;
}

.blog_single_toc_link:hover {
    color: #008BCB;
    background: rgba(0, 139, 203, 0.05);
}

.blog_single_toc_link.active {
    color: #3D4861;
    background: #F4F6F8;
    font-weight: 500;
}

/* Newsletter Widget */
.blog_single_newsletter {
    display: flex;
    padding: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
    align-self: stretch;
    border-radius: 20px;
    background: #E8F8FF;
}

.blog_single_newsletter_title {
    color: #008BCB;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 28.8px;
    margin-bottom: 12px;
}

.blog_single_newsletter_description {
    color: #3D4861;
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 30.4px;
    margin-bottom: 0px;
}

.blog_single_newsletter_form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.blog_single_newsletter_input {
    width: 100%;
    display: flex;
    height: 60px;
    padding: 10px 16px;
    align-items: center;
    align-self: stretch;
    border-radius: 12px;
    background: #FFF;
    outline: none;
    border: 1px solid #E5E7EB;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog_single_newsletter_input:focus {
    border-color: #008BCB;
    box-shadow: 0 0 0 3px rgba(0, 139, 203, 0.1);
}

.blog_single_newsletter_input::placeholder {
    color: #9CA3AF;
}

.blog_single_newsletter_btn {
    width: 100%;
    padding: 12px 24px;
    background: #008BCB;
    border: none;
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.blog_single_newsletter_btn:hover {
    background: #006d9e;
    transform: translateY(-1px);
}

/* ================================
   Author Bio Section
   ================================ */
.blog_single_author_section {
    margin-top: 64px;
}

.blog_single_author_card {
    display: flex;
    padding: 32px;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    align-self: stretch;
    border-radius: 20px;
    background: #E8F8FF;
}

.blog_single_author_card_header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.blog_single_author_card_avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.blog_single_author_card_info {
    display: flex;
    flex-direction: column;
}

.blog_single_author_card_name {
    color: #008BCB;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 28.8px;
    margin-bottom: 0px;
}

.blog_single_author_card_role {
    color: #3D4861;
    font-size: 12px;
    font-style: normal;
    font-weight: 300;
    line-height: 24px;
}

.blog_single_author_card_social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.blog_single_author_social_link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #F3F4F6;
    color: #5D667B;
    transition: all 0.3s ease;
}

.blog_single_author_social_link:hover {
    background: #008BCB;
    color: #FFFFFF;
}

.blog_single_author_card_bio {
    color: #0D1A3A;
    font-size: 14px;
    font-style: normal;
    font-weight: 300;
    line-height: 30.4px;
}

/* ================================
   Related Posts Section
   ================================ */
.blog_single_related_section {
    display: flex;
    padding: 150px 80px;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    align-self: stretch;
    background: #F8F9FA;
}

.blog_single_related_header {
    text-align: center;
    margin-bottom: 48px;
}

.blog_single_related_title {
    color: #0D1A3A;
    font-size: 32px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin-bottom: 24px;
}

.blog_single_related_subtitle {
    color: #5D667B;
    text-align: center;
    font-size: 20px;
    font-style: normal;
    font-weight: 300;
    line-height: 30px;
}

.blog_single_related_grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 80px;
}

/* ================================
   Related Post Card & Blog Card
   FIXED: Separated hover transitions from fade animations
   ================================ */
.blog_single_related_card,
.blog_card {
    display: flex;
    width: 100%;
    padding: 12px;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    border-radius: 16px;
    border: 1px solid #EEE;
    background: #FFF;
    backdrop-filter: blur(8px);
    /* FIXED: Base hover transitions - always active */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* FIXED: Fade animation states that don't interfere with hover */
.blog_single_related_card.fade-up:not(.animated),
.blog_card.fade-up:not(.animated) {
    opacity: 0;
    transform: translateY(30px);
}

/* FIXED: When animated, combine fade with hover transitions */
.blog_single_related_card.fade-up.animated,
.blog_card.fade-up.animated {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out, border-color 0.3s ease, box-shadow 0.3s ease;
}

.blog_card_author span {
    color: #9096A4 !important;
}

.blog_single_related_card:hover,
.blog_card:hover {
    border: 1px solid #CDD1D7;
    box-shadow: 0 4px 12px 0 rgba(13, 26, 58, 0.08);
}

.blog_single_related_card_link,
.blog_card_link {
    text-decoration: none !important;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog_single_related_card_image img,
.blog_card_image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.blog_single_related_card_category,
.blog_card_category {
    display: flex;
    padding: 8px 12px;
    justify-content: center;
    align-items: center;
    gap: 8px;
    position: absolute;
    right: 16px;
    top: 16px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.blog_single_related_card_category span,
.blog_card_category span {
    color: #FFF;
    font-size: 12px;
    font-weight: 400;
    line-height: 100%;
    text-transform: capitalize;
}

.blog_single_related_card_content,
.blog_card_content {
    display: flex;
    flex-direction: column;
    padding: 20px;
    gap: 12px;
    flex: 1;
}

.blog_single_related_card_title,
.blog_card_title {
    color: #0D1A3A;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

.blog_single_related_card_excerpt,
.blog_card_excerpt {
    color: #5D667B;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}

.blog_single_related_card_meta,
.blog_card_meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding-top: 10px;
    margin-top: auto;
}

.blog_single_related_card_divider,
.blog_vertical_divider {
    width: 0.5px;
    height: 12px;
    background: #DDE0E3;
}

.blog_single_related_card_author,
.blog_card_author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.blog_single_related_card_author img,
.blog_card_author img,
.blog_card_author_avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.blog_single_related_card_author span,
.blog_card_author_name {
    color: #9096A4;
    font-size: 13px;
    font-weight: 300;
    line-height: normal;
}

.blog_single_related_card_time,
.blog_card_reading_time {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9096A4;
    font-size: 13px;
    font-weight: 300;
}

.blog_single_related_card_time svg,
.blog_card_reading_time svg {
    flex-shrink: 0;
}