/* =================================================
   BLOG ARTICLE - SINGLE POST VIEW
   Modern, elegant design for individual blog posts
   ================================================= */

/* READING PROGRESS BAR */
.reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: var(--gradient-magenta);
    z-index: 9999;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(199, 21, 133, 0.5);
}

.container {
    max-width: 100% !important;
}

/* =================================================
   ARTICLE HERO - Editorial/Magazine Style
   ================================================= */
.article-hero {
    position: relative;
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem 3rem;
    overflow: hidden;
    background: var(--gradient-magenta);
}

.article-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.article-hero-bg .hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

/* Slight blur only for placeholder when no cover */
.article-hero-bg .hero-bg-image.hero-placeholder {
    filter: blur(1px);
}

/* Magenta gradient overlay - 85-90% opacity, multiply-like effect for texture */
.article-hero-bg .hero-overlay,
.article-hero-bg .hero-overlay-magenta {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(199, 21, 133, 0.75) 0%,
            rgba(139, 21, 56, 0.88) 50%,
            rgba(139, 21, 56, 0.92) 100%);
    mix-blend-mode: multiply;
}

/* Fallback when mix-blend-mode not supported */
@supports not (mix-blend-mode: multiply) {
    .article-hero-bg .hero-overlay-magenta {
        background: linear-gradient(180deg,
                rgba(199, 21, 133, 0.88) 0%,
                rgba(139, 21, 56, 0.92) 60%,
                rgba(139, 21, 56, 0.95) 100%);
        mix-blend-mode: normal;
    }
}

/* Hero without image - solid magenta fallback */
.article-hero:not(:has(.hero-bg-image)) .hero-overlay-magenta {
    background: linear-gradient(180deg,
            rgba(199, 21, 133, 0.9) 0%,
            rgba(139, 21, 56, 0.95) 100%);
    mix-blend-mode: normal;
}

.article-hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Breadcrumb */
.article-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumb-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.breadcrumb-link:hover {
    color: var(--magenta-light);
}

.breadcrumb-link i {
    font-size: 0.85rem;
}

.breadcrumb-separator {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.7rem;
}

.breadcrumb-current {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Article Tags in Hero */
.article-tags {
    list-style: none;
    margin: 0 0 1.5rem;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.article-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: rgba(199, 21, 133, 0.3);
    border: 1px solid rgba(199, 21, 133, 0.5);
    color: var(--primary-white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.article-tag:hover {
    background: var(--magenta);
    border-color: var(--magenta);
    transform: translateY(-2px);
}

.article-tag i {
    font-size: 0.75rem;
}

/* Article Title - Editorial: larger, tighter */
.article-title {
    font-family: var(--font-primary);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    color: var(--primary-white);
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin: 0 auto 1rem;
    text-align: center;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    max-width: 85%;
}

/* Meta: Date & Reading Time below title (Editorial style) */
.article-meta-hero {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.article-meta-hero .meta-date,
.article-meta-hero .meta-reading {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

.article-meta-hero .meta-dot {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 300;
}

/* Article Excerpt */
.article-excerpt {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin: 0 0 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Article Meta */
.article-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.article-meta .meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    font-weight: 500;
}

.article-meta .meta-item i {
    color: var(--magenta-light);
}

.meta-divider {
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
}

/* =================================================
   ARTICLE MAIN LAYOUT - Editorial with elevation
   ================================================= */
.article-main {
    padding: 4rem 1rem;
    background: #F9F9F9;
}

.article-main::before {
    content: "";
    display: block;
    width: 60%;
    max-width: 800px;
    height: 1px;
    margin: 0 auto;
    background: linear-gradient(90deg, transparent, var(--magenta-subtle), transparent);
}

.article-layout {
    display: grid;
    grid-template-columns: 260px 1fr 80px;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

/* Sidebar Styles */
.article-sidebar {
    width: 100%;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    overflow-x: hidden;
    will-change: scroll-position;
    scroll-behavior: smooth;
}

/* Smooth scrolling for TOC */
.sidebar-sticky::-webkit-scrollbar {
    width: 4px;
}

.sidebar-sticky::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
    background: rgba(199, 21, 133, 0.2);
    border-radius: 2px;
}

.sidebar-sticky::-webkit-scrollbar-thumb:hover {
    background: rgba(199, 21, 133, 0.4);
}

/* TOC Container */
.toc-container {
    background: var(--primary-white);
    border-radius: 16px;
    padding: 1.5rem;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.toc-container::before {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: var(--gradient-magenta);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.toc-header i {
    color: var(--magenta);
}

.toc-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toc-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.toc-link:hover {
    color: var(--magenta);
    background: rgba(199, 21, 133, 0.05);
}

.toc-link.active {
    color: var(--magenta);
    background: rgba(199, 21, 133, 0.1);
    border-left-color: var(--magenta);
}

.toc-link.toc-h3 {
    padding-left: 1.5rem;
    font-size: 0.8rem;
}

/* Sidebar Share - below TOC */
.sidebar-share {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.sidebar-share-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

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

.sidebar-share .share-btn {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
}

/* No TOC Message */
.toc-empty {
    color: var(--text-light);
    font-size: 0.85rem;
    font-style: italic;
}

/* Sidebar Actions (Right) */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.action-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--border-light);
}

.action-btn:hover {
    background: var(--gradient-magenta);
    color: var(--primary-white);
    transform: translateY(-3px);
    box-shadow: var(--shadow-magenta);
    border-color: transparent;
}

/* =================================================
   ARTICLE CONTENT - White card with elevation
   ================================================= */
.article-content {
    max-width: 880px;
    width: 100%;
    margin: 0 auto;
    background: var(--primary-white);
    padding: 3.5rem;
    border-radius: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.06);
    contain: layout style;
}

/* Cover Image */
.article-cover {
    margin: 0 0 3rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border: 3px solid var(--magenta-ultra-light);
}

.cover-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s ease;
}

.article-cover:hover .cover-image {
    transform: scale(1.02);
}

.cover-caption {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--light-gray);
    color: var(--text-light);
    font-size: 0.85rem;
}

.cover-caption i {
    color: var(--magenta);
}

/* =================================================
   POST BODY - Editorial Typography (Lora serif)
   ================================================= */
.post-body {
    font-family: 'Lora', var(--font-blog);
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
    letter-spacing: 0.2px;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Paragraphs */
.post-body p {
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

/* =================================================
   QUILL EDITOR ALIGNMENT SUPPORT
   ================================================= */
/* Quill alignment classes */
.post-body .ql-align-center {
    text-align: center !important;
}

.post-body .ql-align-right {
    text-align: right !important;
}

.post-body .ql-align-justify {
    text-align: justify !important;
}

/* Inline style support (Quill sometimes uses inline styles) */
.post-body [style*="text-align: center"],
.post-body [style*="text-align:center"] {
    text-align: center !important;
}

.post-body [style*="text-align: right"],
.post-body [style*="text-align:right"] {
    text-align: right !important;
}

.post-body [style*="text-align: justify"],
.post-body [style*="text-align:justify"] {
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

/* =================================================
   LEAD PARAGRAPH - First paragraph styling
   ================================================= */
/* Lead paragraph - first paragraph slightly larger and bolder */
.post-body>p:first-of-type,
.post-body>h1+p {
    font-size: 1.15rem;
    line-height: 1.85;
    color: var(--text-primary);
}

/* Headings */
.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
    font-family: var(--font-primary);
    color: var(--text-primary);
    font-weight: 800;
    line-height: 1.3;
    margin-top: 3rem;
    margin-bottom: 1.2rem;
    scroll-margin-top: calc(var(--navbar-height) + 2rem);
    scroll-padding-top: calc(var(--navbar-height) + 2rem);
}

/* H1 inside content - Article internal title */
.post-body h1 {
    font-size: 2.2rem;
    text-align: center;
    margin-top: 0;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    position: relative;
    background: var(--gradient-magenta);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-body h1::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: var(--gradient-magenta);
    border-radius: 2px;
}

.post-body h2 {
    font-size: 1.8rem;
    letter-spacing: -0.5px;
    position: relative;
    padding-bottom: 1rem;
    text-align: center;
    margin-top: 3.5rem;
}

.post-body h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-magenta);
    border-radius: 2px;
}

.post-body h3 {
    font-size: 1.5rem;
    text-align: center;
    color: var(--magenta-dark);
    margin-top: 2.5rem;
}

.post-body h4 {
    font-size: 1.25rem;
    color: var(--text-primary);
    border-left: 3px solid var(--magenta);
    padding-left: 1rem;
    text-align: left;
}

/* Links */
.post-body a {
    color: var(--magenta);
    text-decoration: none;
    border-bottom: 2px solid rgba(199, 21, 133, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
}

.post-body a:hover {
    background: rgba(199, 21, 133, 0.1);
    border-bottom-color: var(--magenta);
}

/* Lists - Enhanced styling */
.post-body ul,
.post-body ol {
    margin-bottom: 2rem;
    padding-left: 0;
    list-style: none;
}

.post-body li {
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 2rem;
    line-height: 1.8;
}

/* Custom bullet points */
.post-body ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 8px;
    height: 8px;
    background: var(--gradient-magenta);
    border-radius: 50%;
}

/* Numbered lists with fancy numbers */
.post-body ol {
    counter-reset: list-counter;
}

.post-body ol li {
    counter-increment: list-counter;
    padding-left: 2.5rem;
}

.post-body ol li::before {
    content: counter(list-counter) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--font-primary);
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--magenta);
}

/* List items with bold titles */
.post-body li strong:first-child {
    display: block;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 0.3rem;
}

/* Strong and emphasis text */
.post-body strong {
    color: var(--text-primary);
    font-weight: 700;
}

.post-body em {
    color: var(--magenta-dark);
    font-style: italic;
}

/* Blockquotes - Editorial pull quote style */
.post-body blockquote,
.post-body .pull-quote {
    margin: 3rem 0;
    padding: 2rem 2.5rem 2rem;
    border: none;
    border-left: 4px solid var(--magenta);
    background: linear-gradient(135deg, var(--magenta-ultra-light) 0%, rgba(199, 21, 133, 0.06) 100%);
    border-radius: 0 16px 16px 0;
    font-style: italic;
    font-size: 1.35rem;
    color: var(--magenta-dark);
    overflow: hidden;
    position: relative;
    text-align: left;
    box-shadow: 0 4px 20px rgba(199, 21, 133, 0.08);
    font-family: 'Lora', var(--font-blog);
    line-height: 1.7;
}

.post-body blockquote::before {
    content: "\201C";
    font-family: Georgia, serif;
    font-size: 5rem;
    color: var(--magenta);
    opacity: 0.3;
    position: absolute;
    top: -0.25rem;
    left: 1.5rem;
    line-height: 1;
}

.post-body blockquote::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-magenta);
    border-radius: 0 2px 2px 0;
}

.post-body blockquote p,
.post-body .pull-quote p {
    margin-bottom: 0;
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* Standalone pull-quote class for manual use in content */
.pull-quote {
    font-size: 1.35rem !important;
    color: var(--magenta-dark) !important;
    border-left: 4px solid var(--magenta) !important;
}

/* Images - Desktop: centered, not stretched; Mobile: full width */
.post-body img {
    max-width: 100%;
    width: auto;
    height: auto;
    border-radius: 16px;
    margin: 2.5rem auto;
    box-shadow: var(--shadow-medium);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: block;
    will-change: transform;
}

/* Figure elements (from editor) */
.post-body figure {
    margin: 2.5rem 0;
    padding: 0;
    text-align: center;
}

.post-body figure img {
    margin: 0 auto;
}

.post-body figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-light);
    font-style: italic;
    text-align: center;
}

/* Image alignment classes (from TinyMCE editor) */
.post-body img.align-left,
.post-body img[style*="float: left"],
.post-body img[style*="float:left"] {
    float: left;
    display: inline;
    margin: 0.5rem 1.5rem 1rem 0;
}

.post-body img.align-right,
.post-body img[style*="float: right"],
.post-body img[style*="float:right"] {
    float: right;
    display: inline;
    margin: 0.5rem 0 1rem 1.5rem;
}

.post-body img.align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    float: none;
}

/* Advanced image layout classes (from TinyMCE editor) */

/* Wrap left - text flows around right side */
.post-body img.img-wrap-left {
    float: left;
    display: block;
    margin: 0.5rem 2rem 1.5rem 0;
    max-width: 50%;
    border-radius: 12px;
    shape-outside: margin-box;
}

/* Wrap right - text flows around left side */
.post-body img.img-wrap-right {
    float: right;
    display: block;
    margin: 0.5rem 0 1.5rem 2rem;
    max-width: 50%;
    border-radius: 12px;
    shape-outside: margin-box;
}

/* Overlay - faded background image, text reads over it */
.post-body img.img-overlay {
    display: block;
    float: none;
    width: 100%;
    max-width: 100%;
    margin: -2rem auto 1rem;
    opacity: 0.3;
    border-radius: 16px;
    position: relative;
    z-index: 0;
}

/* Full width - breaks out of content card */
.post-body img.img-full-width {
    display: block;
    float: none;
    width: calc(100% + 7rem);
    max-width: none;
    margin: 2.5rem -3.5rem;
    border-radius: 0;
}

/* Pull-out - slightly wider than content for emphasis */
.post-body img.img-pull-out {
    display: block;
    float: none;
    width: calc(100% + 3rem);
    max-width: none;
    margin: 2.5rem -1.5rem;
    border-radius: 16px;
}

/* Inline - tiny image sits within a line of text */
.post-body img.img-inline {
    display: inline;
    float: none;
    vertical-align: middle;
    margin: 0 0.5rem;
    border-radius: 8px;
    max-height: 2em;
    width: auto;
    box-shadow: none;
}

/* Clearfix: ensure text clears after floated images */
.post-body p::after,
.post-body div::after,
.post-body li::after {
    content: "";
    display: table;
    clear: both;
}

.post-body img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-strong);
}

/* Optimize image loading */
.post-body img[loading="lazy"] {
    opacity: 0;
    animation: fadeInImage 0.3s ease forwards;
}

@keyframes fadeInImage {
    to {
        opacity: 1;
    }
}

/* Code Blocks */
.post-body pre {
    background: var(--charcoal);
    color: var(--primary-white);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    overflow-x: auto;
    margin: 2rem 0;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
    box-shadow: var(--shadow-medium);
    max-width: 100%;
    box-sizing: border-box;
}

.post-body code {
    background: var(--light-gray);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.9em;
    color: var(--magenta-dark);
}

.post-body pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

/* Tables */
.post-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-subtle);
    display: block;
    overflow-x: auto;
}

.post-body th,
.post-body td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.post-body th {
    background: var(--charcoal);
    color: var(--primary-white);
    font-weight: 700;
}

.post-body tr:nth-child(even) {
    background: var(--light-gray);
}

/* Horizontal Rule */
.post-body hr {
    border: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-light), transparent);
    margin: 3rem 0;
}

/* Content Placeholder */
.content-placeholder {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--light-gray);
    border-radius: 16px;
    color: var(--text-light);
    font-style: italic;
}

/* =================================================
   ARTICLE FOOTER
   ================================================= */
.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.footer-tags {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.footer-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-label i {
    color: var(--magenta);
}

.tags-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.footer-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: var(--magenta-ultra-light);
    color: var(--magenta-dark);
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.footer-tag:hover {
    background: var(--magenta);
    color: var(--primary-white);
}

/* Share Section */
.share-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
}

.share-label i {
    color: var(--magenta);
}

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

.share-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    color: var(--primary-white);
}

.share-facebook {
    background: #1877f2;
}

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

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

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

.share-copy {
    background: var(--charcoal);
}

.share-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* =================================================
   AUTHOR BIO SECTION
   ================================================= */
.author-bio-section {
    padding: 3rem 1rem;
    background: #F9F9F9;
}

.author-bio-card {
    max-width: 880px;
    margin: 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    padding: 2rem 2.5rem;
    background: var(--primary-white);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-light);
}

.author-bio-avatar {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-magenta);
    color: var(--primary-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.author-bio-content {
    flex: 1;
}

.author-bio-name {
    font-family: var(--font-primary);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.author-bio-role {
    font-size: 0.9rem;
    color: var(--magenta);
    font-weight: 600;
    margin: 0 0 0.75rem;
}

.author-bio-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
}

/* =================================================
   RELATED POSTS SECTION - 3 cards grid
   ================================================= */
.related-section {
    padding: 4rem 1rem 5rem;
    background: linear-gradient(180deg, #F9F9F9 0%, var(--magenta-ultra-light) 30%, #F9F9F9 100%);
    position: relative;
}

.related-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--magenta), transparent);
}

.related-grid {
    max-width: 1200px;
    margin: 0 auto;
}

.back-to-blog {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    background: var(--primary-white);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid var(--border-light);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-back:hover {
    background: var(--gradient-magenta);
    color: var(--primary-white);
    border-color: transparent;
    transform: translateX(-5px);
    box-shadow: var(--shadow-magenta);
}

.btn-back i {
    transition: transform 0.3s ease;
}

.btn-back:hover i {
    transform: translateX(-5px);
}

.back-section {
    padding: 3rem 1rem;
    background: #F9F9F9;
}

/* =================================================
   SHARE MODAL
   ================================================= */
.share-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.share-modal.active {
    display: flex;
}

.share-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.share-modal-content {
    position: relative;
    background: var(--primary-white);
    border-radius: 24px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-strong);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.share-modal-header h3 {
    margin: 0;
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
}

.share-modal-close {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-modal-close:hover {
    background: var(--charcoal);
    color: var(--primary-white);
}

.share-buttons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.share-btn-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-white);
    transition: all 0.3s ease;
}

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

.share-link-copy {
    display: flex;
    gap: 0.5rem;
}

.share-link-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    background: var(--light-gray);
}

.share-link-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: var(--gradient-magenta);
    color: var(--primary-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.share-link-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-magenta);
}

/* =================================================
   TOAST NOTIFICATIONS
   ================================================= */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--charcoal);
    color: var(--primary-white);
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
    animation: toastSlideIn 0.3s ease;
}

.toast.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.toast.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.toast i {
    font-size: 1.2rem;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* =================================================
   RESPONSIVE DESIGN
   ================================================= */

/* Desktop-only class for sidebars - Show TOC on tablet */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }
}

/* Related Posts Grid - 3 columns on desktop */
.related-posts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.related-card {
    background: var(--primary-white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 2px solid var(--border-light);
    position: relative;
}

.related-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-magenta);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-card:hover::before {
    opacity: 1;
}

.related-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(199, 21, 133, 0.2);
    border-color: var(--magenta);
    background: linear-gradient(180deg, var(--primary-white) 0%, var(--magenta-ultra-light) 100%);
}

.related-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 2rem;
}

.related-title {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.8rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.related-card:hover .related-title {
    color: var(--magenta);
}

.related-excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.related-meta i {
    color: var(--magenta);
    margin-right: 0.3rem;
}

.related-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-badge {
    background: linear-gradient(135deg, var(--magenta-ultra-light), var(--magenta-subtle));
    color: var(--magenta-dark);
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--magenta-subtle);
    transition: all 0.3s ease;
}

.related-card:hover .tag-badge {
    background: var(--gradient-magenta);
    color: var(--text-on-magenta);
    border-color: transparent;
}

/* Tablet Landscape */
@media (max-width: 1200px) {
    .article-layout {
        grid-template-columns: 220px 1fr 70px;
        gap: 2.5rem;
    }

    .toc-container {
        padding: 1.25rem;
    }

    .toc-link {
        font-size: 0.8rem;
        padding: 0.45rem 0.65rem;
    }
}

/* Tablet Portrait */
@media (max-width: 1024px) {
    .article-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .article-sidebar-left {
        order: -1;
        margin-bottom: 2rem;
    }

    .sidebar-sticky {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .toc-container {
        margin: 0 auto;
    }

    .article-content {
        max-width: 100%;
        padding: 2.5rem 2rem;
    }

    .article-sidebar-right {
        display: none;
    }
}

/* Mobile Landscape */
@media (max-width: 900px) {
    .article-main {
        padding: 3rem 1rem;
    }

    .article-content {
        padding: 2rem 1.5rem;
    }
}

@media (min-width: 768px) {
    .related-posts-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) {
    .author-bio-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .author-bio-avatar {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }

    .author-bio-name {
        font-size: 1.2rem;
    }

    .author-bio-role {
        margin-bottom: 0.5rem;
    }

    .article-hero {
        min-height: 45vh;
        padding: 5rem 0.75rem 2rem;
    }

    .article-hero-content {
        padding: 0 0.25rem;
    }

    .article-title {
        font-size: clamp(1.6rem, 5.5vw, 2.2rem);
    }

    .article-main {
        padding: 2rem 0.75rem;
    }

    .article-content {
        padding: 1.75rem 1.25rem;
        border-radius: 16px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .post-body {
        font-size: 1rem;
        line-height: 1.75;
        overflow-wrap: break-word;
        word-wrap: break-word;
    }

    .post-body img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
        margin-left: 0;
        margin-right: 0;
    }

    .post-body img.img-wrap-left,
    .post-body img.img-wrap-right {
        float: none;
        max-width: 100%;
        margin: 1.5rem 0;
    }

    .post-body img.img-full-width,
    .post-body img.img-pull-out {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
    }

    .post-body figure {
        margin: 1.5rem 0;
    }

    .post-body figure img {
        margin-left: 0;
        margin-right: 0;
    }

    .post-body pre {
        overflow-x: auto;
        max-width: 100%;
        padding: 1rem 1.25rem;
    }

    .post-body h2 {
        font-size: 1.7rem;
        margin-top: 2.5rem;
        scroll-margin-top: calc(var(--navbar-height) + 1rem);
    }

    .post-body h3 {
        font-size: 1.4rem;
        scroll-margin-top: calc(var(--navbar-height) + 1rem);
    }

    .post-body blockquote {
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
        margin: 2rem 0;
    }

    .post-body blockquote::before {
        font-size: 3rem;
        margin-top: -0.1rem;
    }

    .article-footer {
        margin-top: 3rem;
        padding-top: 2rem;
    }

    .footer-tags,
    .share-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .related-section {
        padding: 3rem 1rem;
    }

    .related-card {
        padding: 0;
    }

    .toc-container {
        padding: 1.25rem;
    }

    .toc-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    .article-hero {
        min-height: 40vh;
        padding: 4.5rem 0.75rem 2rem;
    }

    .article-breadcrumb {
        gap: 0.4rem;
        font-size: 0.75rem;
    }

    .breadcrumb-link {
        font-size: 0.75rem;
    }

    .article-tags {
        gap: 0.4rem;
        margin-bottom: 1rem;
    }

    .article-tag {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
    }

    .article-title {
        font-size: clamp(1.4rem, 6vw, 1.8rem);
        margin-bottom: 1rem;
        padding: 0 0.25rem;
    }

    .article-excerpt {
        font-size: 0.9rem;
        padding: 0 0.25rem;
    }

    .article-meta {
        gap: 0.8rem;
    }

    .article-meta-hero .meta-date,
    .article-meta-hero .meta-reading {
        font-size: 0.7rem;
    }

    .meta-divider {
        display: none;
    }

    .article-main {
        padding: 1.5rem 0.5rem;
    }

    .article-content {
        padding: 1.25rem 1rem;
        border-radius: 12px;
        max-width: 100%;
        box-sizing: border-box;
    }

    .article-cover {
        margin-bottom: 1.5rem;
        border-radius: 10px;
    }

    .post-body {
        font-size: 0.95rem;
        line-height: 1.7;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: break-word;
    }

    .post-body>p:first-of-type,
    .post-body>h1+p {
        font-size: 1rem;
    }

    .post-body h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
    }

    .post-body h1::after {
        width: 80px;
        height: 3px;
    }

    .post-body h2 {
        font-size: 1.3rem;
        margin-top: 2rem;
        scroll-margin-top: calc(var(--navbar-height) + 0.5rem);
    }

    .post-body h2::after {
        width: 50px;
    }

    .post-body h3 {
        font-size: 1.15rem;
        scroll-margin-top: calc(var(--navbar-height) + 0.5rem);
    }

    .post-body h4 {
        font-size: 1.05rem;
        padding-left: 0.75rem;
    }

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

    .post-body blockquote {
        font-size: 1rem;
        padding: 2rem 1.25rem 1.5rem;
        margin: 2rem 0;
        border-radius: 16px;
    }

    .post-body blockquote::before {
        font-size: 4rem;
        top: -0.25rem;
        left: 0.75rem;
    }

    .post-body blockquote::after {
        width: 40px;
        height: 3px;
    }

    .post-body img {
        width: 100%;
        max-width: 100%;
        height: auto;
        display: block;
        margin: 1.5rem 0;
        margin-left: 0;
        margin-right: 0;
        border-radius: 10px;
    }

    .post-body figure {
        margin: 1.5rem 0;
    }

    .post-body figure img {
        margin-left: 0;
        margin-right: 0;
    }

    .post-body pre {
        padding: 0.85rem 1rem;
        font-size: 0.8rem;
        border-radius: 10px;
        overflow-x: auto;
        max-width: 100%;
    }

    .post-body ul,
    .post-body ol {
        margin-bottom: 1.5rem;
    }

    .post-body li {
        margin-bottom: 1rem;
        padding-left: 1.75rem;
    }

    .post-body ul li::before {
        width: 6px;
        height: 6px;
        top: 0.5rem;
    }

    .post-body ol li {
        padding-left: 2rem;
    }

    .post-body ol li::before {
        font-size: 1rem;
    }

    .post-body li strong:first-child {
        font-size: 1rem;
    }

    .post-body table {
        display: block;
        overflow-x: auto;
        max-width: 100%;
        font-size: 0.85rem;
    }

    .post-body th,
    .post-body td {
        padding: 0.6rem 0.8rem;
    }

    .article-footer {
        margin-top: 2rem;
        padding-top: 1.5rem;
    }

    .footer-label,
    .share-label {
        font-size: 0.85rem;
    }

    .footer-tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }

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

    .share-btn {
        width: 44px;
        height: 44px;
        font-size: 0.9rem;
    }

    .related-section {
        padding: 2rem 0.5rem;
    }

    .related-link {
        padding: 1.25rem;
    }

    .related-title {
        font-size: 1rem;
    }

    .related-excerpt {
        font-size: 0.85rem;
    }

    .related-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.4rem;
        font-size: 0.8rem;
    }

    .related-tags {
        gap: 0.35rem;
    }

    .tag-badge {
        font-size: 0.7rem;
    }

    .btn-back {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

    .toast-container {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0.75rem;
    }

    .toast {
        width: 100%;
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .share-modal-content {
        padding: 1.5rem;
        width: 92%;
        max-width: 350px;
    }

    .share-modal-header h3 {
        font-size: 1.1rem;
    }

    .share-btn-large {
        padding: 0.85rem;
        font-size: 0.85rem;
    }

    .share-link-input {
        padding: 0.6rem 0.85rem;
        font-size: 0.8rem;
    }

    .toc-container {
        padding: 1rem;
    }

    .toc-header {
        font-size: 0.9rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .toc-link {
        font-size: 0.75rem;
        padding: 0.35rem 0.5rem;
    }

    .toc-link.toc-h3 {
        padding-left: 1rem;
        font-size: 0.7rem;
    }
}

/* Floating Action Button on Mobile */
@media (max-width: 1024px) {
    .article-sidebar-right {
        display: flex !important;
        /* Override desktop-only */
        position: fixed !important;
        right: 1rem;
        bottom: 2rem;
        z-index: 100;
        width: auto;
    }

    .article-sidebar-right .sidebar-sticky {
        position: static;
        max-height: none;
        overflow: visible;
    }

    .sidebar-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .action-btn {
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        border: 1px solid rgba(199, 21, 133, 0.2);
    }

    .action-btn:active {
        transform: scale(0.95);
    }

    .related-card {
        padding: 0;
    }
}

/* Safe area support for floating buttons */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 1024px) {
        .article-sidebar-right {
            bottom: calc(2rem + env(safe-area-inset-bottom));
        }
    }
}

/* Print Styles */
@media print {

    .reading-progress-bar,
    .article-breadcrumb,
    .article-tags,
    .article-sidebar,
    .article-footer,
    .author-bio-section,
    .related-section,
    .back-section,
    .share-modal,
    .toast-container {
        display: none !important;
    }

    .article-hero {
        min-height: auto;
        padding: 2rem 0;
        background: none !important;
    }

    .article-hero-bg {
        display: none;
    }

    .article-title {
        color: var(--text-primary) !important;
        text-shadow: none !important;
    }

    .article-meta .meta-item {
        color: var(--text-secondary) !important;
    }

    .article-layout {
        display: block;
    }

    .post-body img {
        box-shadow: none;
        page-break-inside: avoid;
    }
}