/* Blog Post Detail Page Styles */

:root {
    --primary-color: #29489A;
    --primary-hover: #1E3A8A;
    --text-dark: #0B1215;
    --text-gray: #64748b;
    --bg-light: #F5F6FA;
    --bg-white: #ffffff;
    --border-color: #EFEFEF;
    --border-light: #e2e8f0;
}

.blog-detail-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2rem 4rem;
    background: var(--bg-white);
    width: 100%;
    box-sizing: border-box;
}

/* Back to Blog Link */
.back-to-blog {
    margin-bottom: 2rem;
}

.blog-detail-post {
  margin-top: 4rem;
}

.back-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Categories Header (Pills above title) */
.post-categories-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}


/* Hide login-signup elements (Hyvor Talk LOGIN button) - NUCLEAR OPTION */
.login-signup,
[class*="login-signup"],
.user-logged-in .login-signup,
.user-logged-in [class*="login-signup"],
#hyvor-talk-container .login-signup,
#hyvor-talk-wrapper .login-signup,
#hyvor-talk-container [class*="login-signup"],
#hyvor-talk-wrapper [class*="login-signup"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide name and email fields for logged-in users - PREVENT BLINKING */
.user-logged-in #hyvor-talk-container input[type="text"],
.user-logged-in #hyvor-talk-container input[type="email"],
.user-logged-in #hyvor-talk-container input[name*="name" i],
.user-logged-in #hyvor-talk-container input[name*="email" i],
.user-logged-in #hyvor-talk-container input[id*="name" i],
.user-logged-in #hyvor-talk-container input[id*="email" i],
.user-logged-in #hyvor-talk-container input[placeholder*="name" i],
.user-logged-in #hyvor-talk-container input[placeholder*="email" i],
.user-logged-in #hyvor-talk-container label[for*="name" i],
.user-logged-in #hyvor-talk-container label[for*="email" i],
.user-logged-in #hyvor-talk-container .error,
.user-logged-in #hyvor-talk-container [class*="error"],
.user-logged-in #hyvor-talk-container [role="alert"],
.user-logged-in #hyvor-talk-container [class*="invalid"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    clip: rect(0, 0, 0, 0) !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    transition: none !important;
    animation: none !important;
}

/* Hide parent containers of name/email fields */
.user-logged-in #hyvor-talk-container div:has(> input[name*="name" i]),
.user-logged-in #hyvor-talk-container div:has(> input[name*="email" i]),
.user-logged-in #hyvor-talk-container div:has(> input[type="email"]),
.user-logged-in #hyvor-talk-container p:has(> input[name*="name" i]),
.user-logged-in #hyvor-talk-container p:has(> input[name*="email" i]),
.user-logged-in #hyvor-talk-container span:has(> input[name*="name" i]),
.user-logged-in #hyvor-talk-container span:has(> input[name*="email" i]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

.category-pill {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
}

.category-pill:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 72, 154, 0.2);
}

/* Post Header */
.post-header {
    margin-bottom: 3.5rem;
}

.post-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 2.5rem 0;
    text-transform: none;
    line-height: 1.3;
}

/* Post Metadata Header (Author, Date, Reading Time) */
.post-meta-header {
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.post-meta-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.post-meta-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

/* Share Buttons at Top */
.post-share-buttons-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.share-label-top {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-right: 0.25rem;
}

.share-buttons-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.share-btn-top {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.share-btn-top svg {
    width: 16px;
    height: 16px;
}

.share-btn-top:hover {
    background: var(--text-dark);
    color: white;
    border-color: var(--text-dark);
    transform: translateY(-2px);
}

.share-btn-top.share-twitter:hover {
    background: #000000;
    border-color: #000000;
}

.share-btn-top.share-facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
}

.share-btn-top.share-linkedin:hover {
    background: #0A66C2;
    border-color: #0A66C2;
}

/* Position the share button container relative for tooltip positioning */
.share-btn-top.share-link {
    position: relative;
    overflow: visible;
}

/* Ensure parent containers don't clip the tooltip */
.share-buttons-top {
    overflow: visible;
}

.post-share-buttons-top {
    overflow: visible;
}

.post-meta-right {
    overflow: visible;
}

/* Copy Link Notification Tooltip (Tulip Style) - Enhanced UI */
.copy-link-notification {
    position: absolute;
    bottom: calc(100% + 16px);
    left: 50%;
    transform: translateX(-50%) translateY(10px) scale(0.88);
    padding: 0.7rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10000;
    box-shadow: 
        0 8px 24px rgba(16, 185, 129, 0.4),
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 95px;
    max-width: 130px;
    text-align: center;
    letter-spacing: 0.03em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Checkmark icon with better styling - circular badge with checkmark */
.copy-link-notification::before {
    content: '✓';
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
    color: #10b981;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    animation: checkmarkPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
}

.copy-link-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0) scale(1);
    animation: tooltipPulse 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
               tooltipGlow 2s ease-in-out infinite;
}

/* Tooltip arrow (tulip) - pointing down with enhanced styling */
.copy-link-notification::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border: 11px solid transparent;
    border-top-color: #10b981;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.35));
    margin-top: -1px;
}

/* Enhanced animations */
@keyframes tooltipPulse {
    0% {
        transform: translateX(-50%) translateY(10px) scale(0.85);
        opacity: 0;
    }
    60% {
        transform: translateX(-50%) translateY(-3px) scale(1.08);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes checkmarkPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}


@keyframes tooltipGlow {
    0%, 100% {
        box-shadow: 
            0 8px 24px rgba(16, 185, 129, 0.4),
            0 4px 12px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }
    50% {
        box-shadow: 
            0 8px 28px rgba(16, 185, 129, 0.5),
            0 4px 16px rgba(0, 0, 0, 0.2),
            inset 0 1px 0 rgba(255, 255, 255, 0.25);
    }
}

.author-image-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    display: block;
}

.author-image-placeholder-small {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.4rem;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
    min-width: 48px;
    min-height: 48px;
    max-width: 48px;
    max-height: 48px;
}

.post-meta-info {
    flex: 1;
}

/* Authors List */
.post-authors-list {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.author-name-wrapper {
    position: relative;
    display: inline-block;
}

.author-name {
    color: var(--text-dark);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: var(--text-dark);
    transition: color 0.3s, text-decoration-color 0.3s;
    font-weight: 600;
}

.author-name:hover {
    color: var(--primary-color);
    text-decoration-color: var(--primary-color);
}

.author-separator {
    color: var(--text-dark);
    font-weight: 600;
    text-decoration: none;
}

/* Author Tooltip - Matching reference design exactly */
.author-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    padding: 0;
    background: var(--bg-white);
    color: var(--text-dark);
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: normal;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out, transform 0.2s ease-in-out;
    z-index: 1000;
    min-width: 300px;
    max-width: 380px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12), 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.author-name-wrapper:hover .author-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-3px);
}

.tooltip-content {
    padding: 1.6rem 1.8rem;
    display: flex;
    align-items: flex-start;
    gap: 1.4rem;
    white-space: normal;
}

/* Tooltip Avatar (Left Side) */
.tooltip-avatar {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
}

.tooltip-avatar img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: none;
}

.tooltip-avatar-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 2.2rem;
    border: none;
}

/* Tooltip Info (Right Side) */
.tooltip-info {
    flex: 1;
    min-width: 0;
}

.tooltip-name {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.author-tooltip-designation {
    display: block;
    font-size: 1.35rem;
    color: #666;
    margin-bottom: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
}

.author-tooltip-bio {
    display: block;
    font-size: 1.3rem;
    color: #666;
    line-height: 1.6;
    margin-top: 0;
    font-weight: 400;
}

/* Tooltip arrow (tulip) - pointing up */
.author-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 7px solid transparent;
    border-top-color: var(--bg-white);
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.08));
}

/* Optional: Add a subtle border to the arrow for better definition */
.author-tooltip::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.05);
    margin-top: -1px;
    z-index: -1;
}

.post-meta-details {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.3rem;
    color: var(--text-gray);
}

.post-date {
    color: var(--text-gray);
}

.meta-separator {
    color: var(--text-gray);
    font-weight: 300;
}

.reading-time {
    color: var(--text-gray);
    font-weight: 500;
}

/* Featured Image */
.post-featured-image {
    width: 100%;
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    background: var(--bg-light);
}

.post-featured-image:empty,
.post-featured-image:has(img[src=""]) {
    display: none;
}

/* Post Content */
.post-content-wrapper {
    margin-bottom: 3rem;
}

.post-content {
    font-size: 1.7rem;
    line-height: 1.75;
    color: var(--text-dark);
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 2.5rem 0 1.5rem 0;
}

.post-content h3 {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 2rem 0 1rem 0;
}

.post-content h4 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 1.5rem 0 1rem 0;
}

.post-content ul,
.post-content ol {
    margin: 1.5rem 0;
    padding-left: 2.5rem;
}

.post-content li {
    margin-bottom: 0.75rem;
}

.post-content a {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.3s;
}

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

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
    display: block;
}

.post-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-gray);
}

.post-content code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 1.4rem;
}

.post-content pre {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* Share Section */
.post-share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.share-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
}

.share-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.6rem 1.2rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: visible;
    cursor: pointer;
}

.share-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Reactions Section */
.post-reactions {
    margin: 2rem 0 3rem;
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.reactions-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: block;
}

/* Hyvor Talk Reactions Container */
.hyvor-reactions-container {
    min-height: 60px;
    margin-top: 1rem;
}

/* Hide comment sections in reactions container - only show reactions */
.hyvor-reactions-container form,
.hyvor-reactions-container .ht-comment-form,
.hyvor-reactions-container [class*="comment-form"],
.hyvor-reactions-container .ht-comments,
.hyvor-reactions-container [class*="comment-list"],
.hyvor-reactions-container [class*="comments"],
.hyvor-reactions-container [id*="comment"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Show only reactions in the container */
.hyvor-reactions-container .ht-reactions,
.hyvor-reactions-container [class*="reaction"]:not([class*="comment"]),
.hyvor-reactions-container [data-reaction] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Style Hyvor Talk reactions widget */
.hyvor-reactions-container [class*="hyvor"],
.hyvor-reactions-container [class*="reaction"],
.hyvor-reactions-container [id*="hyvor"] {
    font-family: inherit;
}

/* Ensure reactions are visible and styled properly */
.hyvor-reactions-container button,
.hyvor-reactions-container .ht-reaction-button,
.hyvor-reactions-container [role="button"],
.hyvor-reactions-container .ht-reaction,
.hyvor-reactions-container [data-reaction] {
    padding: 0.8rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
}

.hyvor-reactions-container button:hover,
.hyvor-reactions-container .ht-reaction-button:hover,
.hyvor-reactions-container [role="button"]:hover,
.hyvor-reactions-container .ht-reaction:hover,
.hyvor-reactions-container [data-reaction]:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

/* Selected reaction styles - ensure they're visually distinct */
#hyvor-talk-container button[data-selected="true"],
#hyvor-talk-container button.reaction-selected,
#hyvor-talk-container [data-selected="true"],
#hyvor-talk-container .reaction-selected {
    background-color: rgba(41, 72, 154, 0.15) !important;
    border: 2px solid var(--primary-color) !important;
    font-weight: 600 !important;
    opacity: 1 !important;
}

#hyvor-talk-container button[data-selected="true"]:hover,
#hyvor-talk-container button.reaction-selected:hover,
#hyvor-talk-container [data-selected="true"]:hover,
#hyvor-talk-container .reaction-selected:hover {
    background-color: rgba(41, 72, 154, 0.25) !important;
    opacity: 1 !important;
}

/* Legacy styles for backward compatibility */
.reactions-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.reaction-btn {
    padding: 0.8rem 1.5rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reaction-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.reaction-count {
    font-size: 1.3rem;
    font-weight: 600;
}

/* Post Navigation (Previous/Next) */
.post-navigation {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-dark);
    padding: 1.4rem 1.6rem;
    background: var(--bg-white);
    border-radius: 12px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    width: 100%;
    box-sizing: border-box;
}

.nav-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(41, 72, 154, 0.2);
}

.nav-prev {
    text-align: left;
}

.nav-next {
    text-align: left;
}

.nav-arrow {
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.nav-link:hover .nav-arrow {
    opacity: 1;
}

.nav-content {
    flex: 1;
    min-width: 0;
}

.nav-label {
    display: block;
    font-size: 1.15rem;
    color: var(--text-gray);
    margin-bottom: 0.4rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.1rem;
}

.nav-link:hover .nav-label {
    color: rgba(255, 255, 255, 0.9);
}

.nav-title {
    display: block;
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Post Footer */
.post-footer {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
    background: transparent;
}


/* Categories */
.post-categories {
    margin-bottom: 3rem;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.category-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.3s;
}

.category-link:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}

/* Tags Section (Inline after content) */
.post-tags-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 3rem 0 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.tags-label {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-right: 0.5rem;
}

.tags-list-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-pill {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 1.3rem;
    font-weight: 500;
    transition: all 0.3s;
}

.tag-pill:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(41, 72, 154, 0.2);
}

/* Tags (in footer - keeping for backward compatibility) */
.post-tags {
    margin-bottom: 3rem;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tag-link {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    background: var(--bg-light);
    color: var(--text-dark);
    text-decoration: none;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    font-size: 1.3rem;
    transition: all 0.3s;
}

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

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.footer-section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 2rem;
    letter-spacing: -0.02em;
    text-align: left;
    width: 100%;
}

.related-posts-grid {
    display: grid;
    width: 100%;
    box-sizing: border-box;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
    background: transparent;
    max-width: 100%;
}

.related-post-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
}

.related-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(41, 72, 154, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
}

.related-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.related-post-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

.related-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
    display: block;
}

.related-post-image:empty,
.related-post-image:has(img[src=""]) {
    display: none;
}

.related-post-card:hover .related-post-image img {
    transform: scale(1.08);
}

.related-post-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.related-post-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.6rem 0;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s;
}

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

.related-post-excerpt {
    font-size: 1.25rem;
    color: var(--text-gray);
    line-height: 1.5;
    margin: 0 0 1rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.related-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    font-size: 1.15rem;
    color: var(--text-gray);
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.related-post-author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.related-post-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--border-color);
    flex-shrink: 0;
    display: block;
    background-color: var(--bg-light);
}

.related-post-author-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    border: 1.5px solid var(--border-color);
    flex-shrink: 0;
}

.related-post-author {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 1.2rem;
}

.related-post-date {
    color: var(--text-gray);
    font-size: 1.15rem;
}

/* Comments Section */
.comments-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.comments-container {
    background: var(--bg-white);
    width: 100%;
    box-sizing: border-box;
}

.comments-header {
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.comments-title {
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    position: relative;
    padding-bottom: 1rem;
}

.comments-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
    border-radius: 2px;
}

.comments-online {
    font-size: 1.2rem;
    color: var(--text-gray);
    font-weight: 400;
    margin-left: 0.5rem;
}

.comments-login-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s;
}

.comments-login-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.comments-notice {
    font-size: 1.4rem;
    color: var(--text-gray);
    margin-bottom: 3rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    line-height: 1.6;
    font-weight: 500;
}

@media (max-width: 768px) {
    .comments-section {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    
    .comments-title {
        font-size: 2rem;
    }
    
    .comments-notice {
        font-size: 1.3rem;
        padding: 1.2rem 1.5rem;
    }
    
    .comments-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.comment-form-wrapper {
    margin-bottom: 3rem;
    width: 100%;
    box-sizing: border-box;
}

.comment-form-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 2rem 0;
    width: 100%;
}

.comment-form {
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
}

.form-textarea,
.form-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.4rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.3s;
    box-sizing: border-box;
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.6;
}

.form-input {
    height: 48px;
}

.form-textarea:focus,
.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 72, 154, 0.1);
}

.form-textarea::placeholder,
.form-input::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

.form-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 2rem;
}

.form-checkbox {
    width: 20px;
    height: 20px;
    margin-top: 0.2rem;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.form-checkbox-label {
    font-size: 1.3rem;
    color: var(--text-dark);
    line-height: 1.6;
    cursor: pointer;
}

.privacy-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.privacy-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.comment-submit-btn {
    width: auto;
    min-width: 200px;
    padding: 1.4rem 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    display: inline-block;
}

.comment-submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 72, 154, 0.3);
}

.comment-submit-btn:active {
    transform: translateY(0);
}

.comments-filter {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.comments-sort {
    padding: 0.8rem 1.2rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.3rem;
    background: var(--bg-white);
    color: var(--text-dark);
    cursor: pointer;
}

.comments-search-btn {
    padding: 0.8rem 1.2rem;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.4rem;
    cursor: pointer;
    transition: all 0.3s;
}

.comments-search-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.comments-list {
    /* min-height: 200px; */
}


/* Show More Comments Button */
.show-more-comments-btn {
    padding: 1.2rem 2.4rem;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    display: inline-block;
    margin: 2rem 0;
    width: 100%;
    text-align: center;
}

.show-more-comments-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 72, 154, 0.3);
}

.show-more-comments-btn:active {
    transform: translateY(0);
}

/* Comment Form Section */
.comment-form-section {
    margin: 3rem 0;
    animation: slideDown 0.4s ease-out;
}

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

.comment-form-section[data-hidden="true"] {
    display: none !important;
}

.comment-form-card {
    background: var(--bg-white);
    border: 2px solid var(--border-light);
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.comment-form-card:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.comment-form-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--border-light);
}

.comment-form-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.comment-form-subtitle {
    font-size: 1.4rem;
    color: var(--text-gray);
    margin: 0;
    font-weight: 400;
}

.comment-form-content {
    width: 100%;
}

/* Style Hyvor Talk form elements */
#hyvor-talk-container form[data-hyvor-shown="true"] {
    background: transparent;
    padding: 0;
    border: none;
}

#hyvor-talk-container form[data-hyvor-shown="true"] textarea {
    width: 100%;
    min-height: 150px;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1.5rem;
    font-family: inherit;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all 0.3s ease;
    resize: vertical;
    line-height: 1.6;
}

#hyvor-talk-container form[data-hyvor-shown="true"] textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(41, 72, 154, 0.1);
    background: #fafbfc;
}

#hyvor-talk-container form[data-hyvor-shown="true"] button[type="submit"],
#hyvor-talk-container form[data-hyvor-shown="true"] input[type="submit"] {
    padding: 1.4rem 3rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    box-shadow: 0 4px 15px rgba(41, 72, 154, 0.25);
}

#hyvor-talk-container form[data-hyvor-shown="true"] button[type="submit"]:hover,
#hyvor-talk-container form[data-hyvor-shown="true"] input[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 72, 154, 0.35);
}


@media (max-width: 768px) {
    .comment-form-card {
        padding: 2rem 1.5rem;
        border-radius: 12px;
    }
    
    .comment-form-title {
        font-size: 1.8rem;
    }
    
    .comment-form-subtitle {
        font-size: 1.3rem;
    }
    
    #hyvor-talk-container form[data-hyvor-shown="true"] textarea {
        min-height: 120px;
        padding: 1.2rem;
        font-size: 1.4rem;
    }
    
    #hyvor-talk-container form[data-hyvor-shown="true"] button[type="submit"],
    #hyvor-talk-container form[data-hyvor-shown="true"] input[type="submit"] {
        width: 100%;
        padding: 1.3rem 2rem;
        font-size: 1.4rem;
    }
}

/* reCAPTCHA Container */
.hyvor-recaptcha-container {
    margin: 1.5rem 0;
    padding: 1rem 0;
}

.hyvor-recaptcha-container .g-recaptcha {
    display: inline-block;
}

/* Hyvor Talk Wrapper and Container */
.hyvor-talk-wrapper {
    width: 100%;
    position: relative;
}

.hyvor-talk-container {
    width: 100%;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 2rem 0;
    min-height: 100px;
}

#hyvor-talk-view {
    width: 100%;
}

/* COMPLETELY HIDE ALL FORMS IN HYVOR TALK - NO EXCEPTIONS */
/* This is the most aggressive CSS rule - hides everything */
.hyvor-talk-wrapper form,
.hyvor-talk-container form,
.hyvor-talk-wrapper form *,
.hyvor-talk-container form *,
body.user-not-logged-in .hyvor-talk-wrapper form,
body.user-not-logged-in .hyvor-talk-container form,
body.user-not-logged-in .hyvor-talk-wrapper form *,
body.user-not-logged-in .hyvor-talk-container form *,
.hyvor-talk-wrapper[data-user-logged-in="0"] form,
.hyvor-talk-container[data-user-logged-in="0"] form,
.hyvor-talk-wrapper[data-user-logged-in="0"] form *,
.hyvor-talk-container[data-user-logged-in="0"] form * {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
    z-index: -9999 !important;
    max-height: 0 !important;
    max-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Hide form elements for non-logged-in users */
.hyvor-talk-wrapper[data-user-logged-in="0"] textarea,
.hyvor-talk-container[data-user-logged-in="0"] textarea,
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="text"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="text"],
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="email"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="email"],
.hyvor-talk-wrapper[data-user-logged-in="0"] button[type="submit"],
.hyvor-talk-container[data-user-logged-in="0"] button[type="submit"],
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="submit"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="submit"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide all form elements for non-logged-in users */
body.user-not-logged-in .hyvor-talk-wrapper textarea,
body.user-not-logged-in .hyvor-talk-container textarea,
body.user-not-logged-in .hyvor-talk-wrapper input[type="text"],
body.user-not-logged-in .hyvor-talk-container input[type="text"],
body.user-not-logged-in .hyvor-talk-wrapper input[type="email"],
body.user-not-logged-in .hyvor-talk-container input[type="email"],
body.user-not-logged-in .hyvor-talk-wrapper button[type="submit"],
body.user-not-logged-in .hyvor-talk-container button[type="submit"],
body.user-not-logged-in .hyvor-talk-wrapper input[type="submit"],
body.user-not-logged-in .hyvor-talk-container input[type="submit"],
.hyvor-talk-wrapper[data-user-logged-in="0"] textarea,
.hyvor-talk-container[data-user-logged-in="0"] textarea,
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="text"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="text"],
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="email"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="email"],
.hyvor-talk-wrapper[data-user-logged-in="0"] button[type="submit"],
.hyvor-talk-container[data-user-logged-in="0"] button[type="submit"],
.hyvor-talk-wrapper[data-user-logged-in="0"] input[type="submit"],
.hyvor-talk-container[data-user-logged-in="0"] input[type="submit"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* NUCLEAR OPTION: Hide entire comment input area for non-logged-in users */
/* Hide any element that contains form inputs - using JavaScript will handle :has() selector */
/* For now, hide common form container patterns */
.hyvor-talk-wrapper[data-user-logged-in="0"] form,
.hyvor-talk-wrapper[data-user-logged-in="0"] textarea,
.hyvor-talk-wrapper[data-user-logged-in="0"] input,
.hyvor-talk-wrapper[data-user-logged-in="0"] button[type="submit"],
body.user-not-logged-in .hyvor-talk-wrapper form,
body.user-not-logged-in .hyvor-talk-wrapper textarea,
body.user-not-logged-in .hyvor-talk-wrapper input,
body.user-not-logged-in .hyvor-talk-wrapper button[type="submit"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
    z-index: -9999 !important;
}

/* Hide any div/section that contains a form or form elements for non-logged-in users */
.hyvor-talk-wrapper[data-user-logged-in="0"] div:has(form),
.hyvor-talk-wrapper[data-user-logged-in="0"] div:has(textarea),
.hyvor-talk-wrapper[data-user-logged-in="0"] div:has(input[type="text"]),
.hyvor-talk-wrapper[data-user-logged-in="0"] div:has(input[type="email"]),
.hyvor-talk-wrapper[data-user-logged-in="0"] div:has(button[type="submit"]),
body.user-not-logged-in .hyvor-talk-wrapper div:has(form),
body.user-not-logged-in .hyvor-talk-wrapper div:has(textarea),
body.user-not-logged-in .hyvor-talk-wrapper div:has(input[type="text"]),
body.user-not-logged-in .hyvor-talk-wrapper div:has(input[type="email"]),
body.user-not-logged-in .hyvor-talk-wrapper div:has(button[type="submit"]) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Ensure Hyvor Talk elements are properly styled */
#hyvor-talk-container * {
    box-sizing: border-box;
}

/* COMPLETELY HIDE ALL NATIVE HYVOR TALK COMMENT FORMS AND DUPLICATE SECTIONS */
#hyvor-talk-container form:not([data-moved-to-custom="true"]),
#hyvor-talk-container .ht-write-comment,
#hyvor-talk-container [class*="write-comment"],
#hyvor-talk-container [id*="write-comment"],
#hyvor-talk-container [class*="ht-write"],
#hyvor-talk-container [class*="ht-form"],
#hyvor-talk-container [class*="comment-form"]:not(#comment-form-section) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
}

/* Hide duplicate notice boxes from Hyvor Talk (will be handled by JavaScript) */
#hyvor-talk-container [class*="notice"]:not(.comments-notice),
#hyvor-talk-container [class*="policy"],
#hyvor-talk-container [class*="guidelines"] {
    display: none !important;
}

/* Hide textareas that aren't in our custom form */
#hyvor-talk-container textarea:not(#hyvor-comment-form-wrapper textarea),
#hyvor-talk-container textarea:not(#comment-form-section textarea) {
    display: none !important;
    visibility: hidden !important;
}

/* Only show textarea when it's in our custom form section */
#comment-form-section textarea,
#hyvor-comment-form-wrapper textarea {
    display: block !important;
    visibility: visible !important;
}

/* Style Hyvor Talk comments display */
#hyvor-talk-container .ht-comment,
#hyvor-talk-container [class*="comment"] {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-white);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

#hyvor-talk-container .ht-comment:hover,
#hyvor-talk-container [class*="comment"]:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

/* Style comment avatars */
#hyvor-talk-container .ht-avatar,
#hyvor-talk-container [class*="avatar"] {
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

/* Style comment text */
#hyvor-talk-container .ht-comment-body,
#hyvor-talk-container [class*="comment-body"],
#hyvor-talk-container [class*="comment-text"] {
    color: var(--text-dark);
    font-size: 1.5rem;
    line-height: 1.7;
    margin-top: 1rem;
}

/* Style comment metadata */
#hyvor-talk-container .ht-comment-meta,
#hyvor-talk-container [class*="comment-meta"] {
    color: var(--text-gray);
    font-size: 1.3rem;
    margin-top: 0.5rem;
}

/* Style comment actions (like, reply buttons) */
#hyvor-talk-container .ht-comment-actions,
#hyvor-talk-container [class*="comment-actions"] {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

#hyvor-talk-container .ht-comment-actions button,
#hyvor-talk-container [class*="comment-actions"] button {
    background: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

#hyvor-talk-container .ht-comment-actions button:hover,
#hyvor-talk-container [class*="comment-actions"] button:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

/* Hide comment form initially */
.hyvor-talk-container form[data-hyvor-hidden="true"] {
    display: none !important;
}

/* COMPLETELY HIDE ALL NATIVE HYVOR TALK COMMENT FORMS - ALWAYS HIDDEN */
/* We ONLY use our custom form section */
.hyvor-talk-container form:has(textarea),
.hyvor-talk-container form,
.hyvor-talk-container textarea:not(#hyvor-comment-form-wrapper textarea):not(#comment-form-section textarea),
.hyvor-talk-container input[type="text"]:not(#hyvor-comment-form-wrapper input):not(#comment-form-section input),
.hyvor-talk-container input[type="email"]:not(#hyvor-comment-form-wrapper input):not(#comment-form-section input),
.hyvor-talk-container button[type="submit"]:not(#hyvor-comment-form-wrapper button):not(#comment-form-section button),
.hyvor-talk-container input[type="submit"]:not(#hyvor-comment-form-wrapper input):not(#comment-form-section input) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
}

/* COMPLETELY HIDE ALL COMMENT FORMS FOR NON-LOGGED-IN USERS */
body.user-not-logged-in #hyvor-talk-container form,
body.user-not-logged-in #hyvor-talk-container textarea,
body.user-not-logged-in #hyvor-talk-container input[type="text"],
body.user-not-logged-in #hyvor-talk-container input[type="email"],
body.user-not-logged-in #hyvor-talk-container button[type="submit"],
body.user-not-logged-in #hyvor-talk-container input[type="submit"],
body.user-not-logged-in #hyvor-talk-container [class*="write-comment"],
body.user-not-logged-in #hyvor-talk-container [class*="comment-form"]:not(#comment-form-section) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    pointer-events: none !important;
}

/* Hide name and email fields in Hyvor Talk comment form - ALWAYS hidden */
#hyvor-talk-container input[type="text"][name*="name"],
#hyvor-talk-container input[type="text"][name*="Name"],
#hyvor-talk-container input[type="email"],
#hyvor-talk-container input[name*="name"],
#hyvor-talk-container input[name*="email"],
#hyvor-talk-container input[name*="Name"],
#hyvor-talk-container input[name*="Email"],
#hyvor-talk-container label[for*="name"],
#hyvor-talk-container label[for*="Name"],
#hyvor-talk-container label[for*="email"],
#hyvor-talk-container label[for*="Email"],
#hyvor-talk-container .ht-input-name,
#hyvor-talk-container .ht-input-email,
#hyvor-talk-container [class*="name-input"],
#hyvor-talk-container [class*="email-input"],
#hyvor-talk-container [class*="Name-input"],
#hyvor-talk-container [class*="Email-input"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

/* Hide parent containers of name/email fields */
#hyvor-talk-container form > div:has(input[name*="name"]),
#hyvor-talk-container form > div:has(input[name*="Name"]),
#hyvor-talk-container form > div:has(input[type="email"]),
#hyvor-talk-container form > div:has(input[name*="email"]),
#hyvor-talk-container form > div:has(input[name*="Email"]) {
    display: none !important;
}

/* Hide any div/fieldset that contains name or email inputs */
#hyvor-talk-container div:has(> input[name*="name"]),
#hyvor-talk-container div:has(> input[name*="Name"]),
#hyvor-talk-container div:has(> input[type="email"]),
#hyvor-talk-container div:has(> input[name*="email"]) {
    display: none !important;
}

.comment-editor-wrapper {
    width: 100%;
    margin-top: 2rem;
}

/* Login Popup */
.login-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.login-popup-content {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    animation: popupFadeIn 0.3s ease-out;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-popup-header {
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-popup-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.login-popup-close {
    background: none;
    border: none;
    font-size: 2.4rem;
    color: var(--text-gray);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    line-height: 1;
}

.login-popup-close:hover {
    background: var(--bg-light);
    color: var(--text-dark);
}

.login-popup-body {
    padding: 2rem;
}

.login-popup-body p {
    font-size: 1.5rem;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
}

.login-popup-footer {
    padding: 1rem 2rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
}

.login-popup-btn {
    padding: 1.2rem 2.4rem;
    border: none;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.login-popup-btn-primary {
    background: var(--primary-color);
    color: white;
}

.login-popup-btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 72, 154, 0.3);
}

.login-popup-btn-secondary {
    background: var(--bg-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.login-popup-btn-secondary:hover {
    background: var(--border-color);
    border-color: var(--text-gray);
}

.login-popup-btn:active {
    transform: translateY(0);
}

/* Login to Comment Card */
.login-to-comment-wrapper {
    margin: 3rem 0;
    width: 100%;
}

.login-to-comment-card {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid var(--primary-color);
    border-radius: 16px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(41, 72, 154, 0.1);
    transition: all 0.3s ease;
}

.login-to-comment-card:hover {
    box-shadow: 0 6px 30px rgba(41, 72, 154, 0.15);
    transform: translateY(-2px);
}

.login-to-comment-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.login-to-comment-title {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 1rem 0;
}

.login-to-comment-text {
    font-size: 1.5rem;
    color: var(--text-gray);
    margin: 0 0 2.5rem 0;
    line-height: 1.6;
}

.login-to-comment-btn {
    display: inline-block;
    padding: 1.4rem 3.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(41, 72, 154, 0.25);
}

.login-to-comment-btn:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 72, 154, 0.35);
    color: white;
    text-decoration: none;
}

.login-to-comment-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .login-to-comment-card {
        padding: 3rem 2rem;
    }
    
    .login-to-comment-icon {
        font-size: 3rem;
    }
    
    .login-to-comment-title {
        font-size: 1.8rem;
    }
    
    .login-to-comment-text {
        font-size: 1.4rem;
    }
    
    .login-to-comment-btn {
        width: 100%;
        padding: 1.3rem 2.5rem;
        font-size: 1.4rem;
    }
}

/* Login Required Section - replaces comment section for non-logged-in users */
.login-required-section {
    margin-top: 2rem;
    padding-top: 2rem;
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
}

/* Show comments section for all users (both logged-in and non-logged-in) */
.comments-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
}

/* Hide only the Hyvor Talk wrapper for non-logged-in users, but show the login section */
.comments-section[data-user-logged-in="0"] #hyvor-talk-wrapper {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Show Hyvor Talk wrapper for logged-in users */
.comments-section[data-user-logged-in="1"] #hyvor-talk-wrapper,
#hyvor-talk-wrapper[data-user-logged-in="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
    min-height: 200px !important;
}

.comments-section[data-user-logged-in="1"] #hyvor-talk-container,
#hyvor-talk-container[data-user-logged-in="1"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 200px !important;
}

.comments-section[data-user-logged-in="1"] #hyvor-talk-view,
#hyvor-talk-view {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: 100% !important;
    min-height: 200px !important;
}

/* Show login section for non-logged-in users */
.comments-section[data-user-logged-in="0"] .login-required-section {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: 100% !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .blog-detail-container {
        max-width: 90%;
        padding: 2rem 1.5rem 4rem;
    }
}

@media (max-width: 992px) {
    .blog-detail-container {
        max-width: 95%;
        padding: 1.5rem 1.5rem 3rem;
    }
    
    .post-title {
        font-size: 2.4rem;
        line-height: 1.2;
    }
    
    .post-content {
        font-size: 1.6rem;
        line-height: 1.7;
    }
    
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .related-post-image {
        height: 180px;
    }
    
    .related-post-content {
        padding: 1.5rem;
    }
    
    .post-navigation {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-meta-header {
        flex-wrap: wrap;
    }
    
    .post-meta-left {
        min-width: 0;
        flex: 1 1 100%;
    }
    
    .post-meta-right {
        width: 100%;
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

@media (max-width: 768px) {
    .blog-detail-container {
        max-width: 100%;
        padding: 1.5rem 1.2rem 3rem;
    }
    
    .back-to-blog {
        margin-bottom: 1.5rem;
    }
    
    .blog-detail-post {
        margin-top: 2rem;
    }
    
    .post-title {
        font-size: 2.2rem;
        line-height: 1.25;
        margin-bottom: 2rem;
    }
    
    .post-content {
        font-size: 1.5rem;
        line-height: 1.7;
    }
    
    .post-header {
        margin-bottom: 2.5rem;
    }
    
    .post-meta-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .post-meta-left {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 1rem;
    }
    
    .post-meta-info {
        width: auto;
        flex: 1;
    }
    
    .post-meta-right {
        width: 100%;
        justify-content: flex-start;
        margin-top: 1rem;
    }
    
    .post-share-buttons-top {
        width: 100%;
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }
    
    .share-label-top {
        font-size: 1.1rem;
        margin-right: 0.25rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .share-buttons-top {
        width: auto;
        flex: 1;
        justify-content: flex-start;
        gap: 0.4rem;
    }
    
    .share-btn-top {
        width: 30px;
        height: 30px;
        flex-shrink: 0;
    }
    
    .share-btn-top svg {
        width: 15px;
        height: 15px;
    }
    
    .post-meta-details {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .meta-separator {
        display: inline;
    }
    
    .post-featured-image {
        margin-bottom: 2rem;
        border-radius: 6px;
    }
    
    .post-content-wrapper {
        margin-bottom: 2.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .comment-form-title {
        font-size: 1.8rem;
    }
    
    .post-tags-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tags-label {
        margin-bottom: 0;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .related-post-card {
        width: 100%;
    }
    
    .share-buttons {
        gap: 0.5rem;
    }
    
    .share-btn {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }
    
    .post-share-buttons-top {
        flex-direction: row;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
    }
    
    .share-label-top {
        font-size: 1.2rem;
        margin-right: 0.5rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .share-buttons-top {
        gap: 0.5rem;
        flex-wrap: wrap;
        width: auto;
        flex: 1;
        justify-content: flex-start;
    }
    
    .share-btn-top {
        width: 38px;
        height: 38px;
        flex-shrink: 0;
    }
    
    .share-btn-top svg {
        width: 19px;
        height: 19px;
    }
    
    .post-share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem 0;
    }
    
    .share-label {
        width: 100%;
        margin-bottom: 0;
    }
    
    .share-buttons {
        width: 100%;
        gap: 0.75rem;
    }
    
    .share-btn {
        flex: 1 1 auto;
        min-width: 0;
        text-align: center;
    }
    
    .post-share-buttons-top {
        gap: 0.4rem;
    }
    
    .share-label-top {
        font-size: 1rem;
        margin-right: 0.25rem;
    }
    
    .share-buttons-top {
        gap: 0.3rem;
    }
    
    .share-btn-top {
        width: 28px;
        height: 28px;
        border-radius: 6px;
    }
    
    .share-btn-top svg {
        width: 14px;
        height: 14px;
    }
    
    .reactions-buttons {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .reaction-btn {
        font-size: 1.4rem;
        padding: 0.6rem 1.2rem;
    }
    
    .post-navigation {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 1.2rem 1.4rem;
    }
    
    .nav-title {
        font-size: 1.4rem;
    }
    
    .post-categories-header {
        margin-bottom: 1.5rem;
    }
    
    .category-pill {
        font-size: 1.2rem;
        padding: 0.5rem 1.2rem;
    }
}

@media (max-width: 480px) {
    .blog-detail-container {
        padding: 1rem 1rem 2rem;
    }
    
    .back-to-blog {
        margin-bottom: 1rem;
    }
    
    .blog-detail-post {
        margin-top: 1.5rem;
    }
    
    .post-title {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
    }
    
    .post-content {
        font-size: 1.4rem;
        line-height: 1.65;
    }
    
    .post-header {
        margin-bottom: 2rem;
    }
    
    .post-categories-header {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }
    
    .category-pill {
        font-size: 1.1rem;
        padding: 0.5rem 1rem;
    }
    
    .post-authors-list {
        font-size: 1.3rem;
    }
    
    .author-image-small,
    .author-image-placeholder-small {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
    
    .post-meta-info {
        font-size: 1.3rem;
    }
    
    .author-tooltip {
        min-width: 260px;
        max-width: 90vw;
        font-size: 1.2rem;
        left: 50%;
        transform: translateX(-50%);
    }
    
    .tooltip-content {
        padding: 1.2rem 1.4rem;
        gap: 1rem;
    }
    
    .tooltip-avatar {
        width: 50px;
        height: 50px;
    }
    
    .tooltip-avatar img,
    .tooltip-avatar-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.8rem;
    }
    
    .tooltip-name {
        font-size: 1.3rem;
        margin-bottom: 0.4rem;
    }
    
    .author-tooltip-designation {
        font-size: 1.15rem;
        margin-bottom: 0.6rem;
    }
    
    .author-tooltip-bio {
        font-size: 1.1rem;
    }
    
    .post-meta-details {
        font-size: 1.2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .meta-separator {
        display: none;
    }
    
    .post-featured-image {
        margin-bottom: 1.5rem;
        border-radius: 4px;
    }
    
    .tags-list-inline {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .tag-pill {
        font-size: 1.1rem;
        padding: 0.4rem 0.9rem;
    }
    
    .categories-list,
    .tags-list {
        gap: 0.5rem;
    }
    
    .category-link,
    .tag-link {
        font-size: 1.1rem;
        padding: 0.5rem 0.9rem;
    }
    
    .post-share-section {
        padding: 1.2rem 0;
        margin: 2rem 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .share-label {
        font-size: 1.3rem;
        width: 100%;
    }
    
    .share-buttons {
        width: 100%;
        gap: 0.5rem;
    }
    
    .share-btn {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
        text-align: center;
    }
    
    .post-navigation {
        padding: 1.2rem 1.2rem;
    }
    
    .nav-link {
        padding: 1rem 1.2rem;
    }
    
    .nav-title {
        font-size: 1.3rem;
        line-height: 1.4;
    }
    
    .nav-label {
        font-size: 1.1rem;
    }
    
    .related-post-card {
        padding: 1.2rem;
    }
    
    .related-post-title {
        font-size: 1.5rem;
    }
    
    .related-post-excerpt {
        font-size: 1.2rem;
    }
    
    .comments-section {
        margin-top: 3rem;
    }
    
    .comments-title {
        font-size: 1.8rem;
    }
    
    .comment-form-title {
        font-size: 1.6rem;
    }
    
    .comment-input-field {
        font-size: 1.4rem;
    }
    
    .comment-submit-btn {
        width: 100%;
        min-width: auto;
        padding: 1.2rem 2rem;
    }
    
    
    .login-popup-content {
        width: 95%;
        max-width: 95%;
    }
    
    .login-popup-header {
        padding: 1.5rem 1.5rem 1rem;
    }
    
    .login-popup-header h3 {
        font-size: 1.8rem;
    }
    
    .login-popup-body {
        padding: 1.5rem;
    }
    
    .login-popup-body p {
        font-size: 1.3rem;
    }
    
    .login-popup-footer {
        padding: 1rem 1.5rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .login-popup-btn {
        width: 100%;
        padding: 1.2rem 2rem;
    }
}
