/* ===========================================
   POST PAGE STYLES - Single article view
   =========================================== */

/* Share Toast Notification */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 14px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.4);
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.share-toast svg {
    flex-shrink: 0;
}

/* Share button specific styling */
.btn-icon.share-btn {
    background: rgba(16, 185, 129, 0.2);
    border-color: rgba(16, 185, 129, 0.4);
}

.btn-icon.share-btn:hover {
    background: rgba(16, 185, 129, 0.4);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Snippet button styling */
.btn-icon.snippet-btn {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.4);
}

.btn-icon.snippet-btn:hover {
    background: rgba(139, 92, 246, 0.4);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Article Page Container */
.article-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

/* Remove padding when viewing a post (article-wrapper present) */
body:has(.article-wrapper) .article-container {
    padding: 0;
}

/* Page background for post page */
body:has(.article-container) {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #94a3b8 100%);
    background-attachment: fixed;
}

/* Block editor - expands container */
body:has(.block-editor) .article-container {
    max-width: 1400px;
}

/* ===========================================
   BLOCK EDITOR STYLES
   =========================================== */

.block-editor {
    background: white;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 8px 48px rgba(30, 41, 59, 0.12);
    overflow: hidden;
    margin-bottom: 40px;
}

.block-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    border-bottom: 1px solid rgba(59, 130, 246, 0.3);
}

.block-editor-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.block-editor-actions {
    display: flex;
    gap: 10px;
}

.block-editor-actions .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.block-editor-actions .btn.secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.block-editor-actions .btn.secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

.block-editor-layout {
    display: grid;
    grid-template-columns: 200px 1fr 600px;
    min-height: 600px;
}

/* Compact layout for index page */
.block-editor-layout-compact {
    min-height: 500px;
}

.block-editor-layout-inline {
    min-height: 400px;
}

/* Inline block editor (used in article cards) */
.block-editor-inline {
    margin-bottom: 16px;
}

.block-editor-inline .block-sidebar {
    padding: 16px;
}

.block-editor-inline .block-add-btn {
    padding: 8px 10px;
    font-size: 0.85rem;
}

.block-editor-inline .block-add-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive compact layout */
@media (max-width: 1100px) {

    .block-editor-layout-compact,
    .block-editor-layout-inline {
        grid-template-columns: 160px 1fr 200px;
    }
}

@media (max-width: 900px) {

    .block-editor-layout-compact,
    .block-editor-layout-inline {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }

    .block-editor-layout-compact .block-sidebar,
    .block-editor-layout-inline .block-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .block-editor-layout-compact .block-sidebar h4,
    .block-editor-layout-inline .block-sidebar h4 {
        width: 100%;
    }

    .block-editor-layout-compact .block-add-btn,
    .block-editor-layout-inline .block-add-btn {
        flex: 0 0 auto;
        width: auto;
    }

    .block-editor-layout-compact .block-sidebar-section,
    .block-editor-layout-inline .block-sidebar-section {
        width: 100%;
        margin-top: 12px;
        padding-top: 12px;
    }

    .block-editor-layout-compact .block-preview-panel,
    .block-editor-layout-inline .block-preview-panel {
        border-left: none;
        border-top: 1px solid #e5e7eb;
        max-height: 250px;
        overflow-y: auto;
    }
}

/* Sidebar */
.block-sidebar {
    background: #f8fafc;
    border-right: 1px solid #e5e7eb;
    padding: 20px;
}

.block-sidebar h4 {
    margin: 0 0 12px 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.block-add-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

.block-add-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

.block-add-btn svg {
    opacity: 0.7;
}

.block-sidebar-section {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

.block-sidebar-section label {
    display: block;
}

.block-sidebar-section label span {
    display: inline;
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0;
}

.block-sidebar-section .form-control {
    font-size: 0.85rem;
}

/* Sidebar actions (buttons) */
.block-sidebar-actions {
    margin-top: 12px;
    padding-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.block-sidebar-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s;
}

/* Primary button (Save Changes) */
.block-sidebar-actions .save-edit-btn {
    background: #3b82f6;
    border: none;
    color: white;
}

.block-sidebar-actions .save-edit-btn:hover {
    background: #2563eb;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

/* Secondary button (Cancel) */
.block-sidebar-actions .cancel-edit-btn {
    background: rgba(30, 41, 59, 0.1);
    border: 1px solid #cbd5e1;
    color: #334155;
}

.block-sidebar-actions .cancel-edit-btn:hover {
    background: rgba(30, 41, 59, 0.15);
    border-color: #94a3b8;
}

/* Main Editor */
.block-editor-main {
    padding: 24px;
    background: white;
}

.block-title-area {
    margin-bottom: 24px;
}

.block-title-input {
    width: 100%;
    padding: 12px 0;
    font-size: 2rem;
    font-weight: 700;
    border: none;
    border-bottom: 2px solid #e5e7eb;
    outline: none;
    color: #1f2937;
    transition: border-color 0.2s;
}

.block-title-input:focus {
    border-bottom-color: #3b82f6;
}

.block-title-input::placeholder {
    color: #9ca3af;
}

.block-canvas {
    min-height: 300px;
}

.block-item {
    position: relative;
    margin-bottom: 16px;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.2s;
}

.block-item:hover {
    border-color: #e5e7eb;
}

.block-item:focus-within {
    border-color: #3b82f6;
}

.block-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 6px 6px 0 0;
    opacity: 0;
    transition: opacity 0.2s;
}

.block-item:hover .block-controls,
.block-item:focus-within .block-controls {
    opacity: 1;
}

.block-controls button {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.15s;
}

.block-controls button:hover:not(:disabled) {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.block-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.block-controls .block-delete:hover {
    background: #ef4444;
    border-color: #ef4444;
}

.block-type-label {
    flex: 1;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    text-align: center;
}

.block-content {
    padding: 12px;
}

.block-content textarea,
.block-content input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.block-content textarea:focus,
.block-content input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.block-text-input {
    line-height: 1.6;
}

.block-heading-wrapper {
    display: flex;
    gap: 10px;
}

.block-heading-level {
    width: 70px;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    background: #f8fafc;
}

.block-heading-input {
    flex: 1;
    font-weight: 600;
}

.block-image-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.block-image-upload-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.block-image-upload-row .block-image-url {
    flex: 1;
}

.block-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #3b82f6;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.block-upload-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    background: #2563eb;
}

.block-upload-btn svg {
    flex-shrink: 0;
}

.block-upload-status {
    font-size: 0.85rem;
    color: #3b82f6;
    min-height: 1.2em;
}

.block-image-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.block-image-preview.block-image-empty {
    border: 2px dashed #d1d5db;
    padding: 30px;
    color: #9ca3af;
}

.block-image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
}

/* Banner Block Styles */
.block-banner-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.block-banner-upload-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.block-banner-url {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.9rem;
}

.block-banner-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f8fafc;
    border-radius: 8px;
    text-align: center;
}

.block-banner-preview.block-banner-empty {
    border: 2px dashed #d1d5db;
    padding: 30px;
    color: #9ca3af;
}

.block-banner-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 6px;
}

.block-quote-input {
    border-left: 4px solid #3b82f6 !important;
    background: #f9fafb;
    font-style: italic;
}

.block-code-input {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    background: #1f2937;
    color: #f9fafb;
    border-color: #1f2937 !important;
}

.block-code-input:focus {
    border-color: #3b82f6 !important;
}

.block-divider-preview hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 10px 0;
}

.block-add-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px dashed #e5e7eb;
}

.block-add-inline {
    padding: 10px 16px;
    background: transparent;
    border: 1px dashed #d1d5db;
    border-radius: 6px;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.block-add-inline:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #eff6ff;
}

/* Preview Panel */
.block-preview-panel {
    background: #f8fafc;
    border-left: 1px solid #e5e7eb;
    padding: 1px;
    overflow-y: auto;
}

.block-preview-panel h4 {
    margin: 0 0 16px 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.block-preview-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.block-preview-content h1,
.block-preview-content h2,
.block-preview-content h3 {
    margin-top: 16px;
    margin-bottom: 8px;
    color: #1f2937;
}

.block-preview-content h1 {
    font-size: 1.5rem;
}

.block-preview-content h2 {
    font-size: 1.25rem;
}

.block-preview-content h3 {
    font-size: 1.1rem;
}

.block-preview-content img {
    max-width: 100%;
    border-radius: 6px;
}

.block-preview-content blockquote {
    border-left: 3px solid #3b82f6;
    padding-left: 12px;
    margin: 12px 0;
    color: #6b7280;
    font-style: italic;
}

/* Responsive */
@media (max-width: 1200px) {
    .block-editor-layout {
        grid-template-columns: 180px 1fr 500px;
    }
}

@media (max-width: 900px) {
    .block-editor-layout {
        grid-template-columns: 1fr;
    }

    .block-sidebar {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 16px;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .block-sidebar h4 {
        width: 100%;
    }

    .block-add-btn {
        flex: 0 0 auto;
        width: auto;
        margin-bottom: 0;
    }

    .block-sidebar-section {
        width: 100%;
        margin-top: 16px;
        padding-top: 16px;
    }

    .block-preview-panel {
        border-left: none;
        border-top: 1px solid #e5e7eb;
    }
}

@media (max-width: 600px) {
    .block-editor {
        border-radius: 12px;
    }

    .block-editor-header {
        padding: 14px 16px;
    }

    .block-editor-header h2 {
        font-size: 1.1rem;
    }

    .block-editor-actions {
        gap: 6px;
    }

    .block-editor-actions .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .block-editor-main {
        padding: 12px;
    }

    .block-title-input {
        font-size: 1.1rem !important;
        padding: 10px 12px !important;
    }

    .block-item {
        padding: 10px;
        margin-bottom: 10px;
    }

    .block-label {
        font-size: 0.7rem;
        padding: 3px 6px;
    }

    .block-controls {
        gap: 4px;
    }

    .block-control-btn {
        padding: 4px;
        width: 24px;
        height: 24px;
    }

    .block-control-btn svg {
        width: 12px;
        height: 12px;
    }

    .block-text-input,
    .block-quote-input,
    .block-code-input,
    .block-list-input {
        font-size: 0.95rem;
        padding: 10px;
    }

    .block-heading-wrapper {
        flex-direction: column;
        gap: 8px;
    }

    .block-heading-level {
        width: 100%;
    }

    .block-image-upload-row {
        flex-direction: column;
        align-items: stretch;
    }

    .block-upload-btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }

    .block-add-footer {
        padding: 8px 0;
    }

    .block-add-inline {
        font-size: 0.85rem;
        padding: 8px 12px;
    }
}

/* ===========================================
   END BLOCK EDITOR STYLES
   =========================================== */

/* Unified Article Wrapper */
.article-wrapper {
    background: white;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 8px 48px rgba(30, 41, 59, 0.12);
    overflow: hidden;
    margin-bottom: 40px;
}

/* Article Post */
.article-post {
    margin-bottom: 0;
}

/* Article Hero Section */
.article-hero {
    padding: 40px;
    margin-bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    color: white;
    border-radius: 0;
    box-shadow: none;
}

.article-hero-content {
    max-width: 100%;
}

.article-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 0 0 24px 0;
    color: white;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.article-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    flex-wrap: wrap;
}

.article-author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.author-name {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.article-date {
    font-size: 0.875rem;
    opacity: 0.9;
}

.article-stats {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.stat-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-badge svg {
    opacity: 0.9;
}

.article-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
    justify-content: flex-end;
}

.article-actions:has(.edit-post-btn) {
    justify-content: flex-start;
}

.article-actions .back-home {
    margin-left: auto;
    text-decoration: none;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(59, 130, 246, 0.2);
    color: white;
    border: 1px solid rgba(59, 130, 246, 0.4);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-icon.danger:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Content Section */
.article-content {
    padding: 48px;
    padding-bottom: 40px;
    background: white;
    border-radius: 0;
    border: none;
    box-shadow: none;
}

/* Override card styles for connected layout */
.article-content.card,
.article-hero.card {
    border-radius: 0;
    margin-bottom: 0;
    border: none;
    box-shadow: none;
}

.article-content.card:hover,
.article-hero.card:hover {
    transform: none;
    box-shadow: none;
}

.article-content.card::before,
.article-hero.card::before {
    display: none;
}

.article-content .post-message {
    font-size: 1.15rem;
    line-height: 2;
    color: #1e293b;
    max-width: 100%;
    margin: 0;
}

/* Bold text styling - regular emphasis */
.article-content .post-message strong {
    color: #1e40af;
    font-weight: 700;
}

/* Bold text with $ (tickers/money) - add background */
.article-content .post-message strong.ticker {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Banner Image - Full width, bypassing padding */
.banner-image-container {
    margin: -48px -48px 0 -48px;
    width: calc(100% + 96px);
    overflow: hidden;
}

/* No top gap when banner is first element */
.banner-image-container:first-child {
    margin-top: -48px;
}

.banner-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 500px;
    border-radius: 0;
}

/* Regular post images */
.image-container {
    margin: 24px 0;
    text-align: center;
}

.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.article-content .post-message h1,
.article-content .post-message h2,
.article-content .post-message h3 {
    margin-top: 48px;
    margin-bottom: 24px;
    color: #0f172a;
    font-weight: 700;
    position: relative;
    padding-bottom: 0;
}


.article-content .post-message h1 {
    font-size: 2rem;
    line-height: 1.3;
    color: #0f172a;
    padding-bottom: 12px;
    border-bottom: 3px solid #3b82f6;
}

.article-content .post-message h1:first-child {
    margin-top: 0;
}

.article-content .post-message h2 {
    font-size: 1.6rem;
    line-height: 1.4;
    color: #0f172a;
    padding-bottom: 12px;
    border-bottom: 2px solid #3b82f6;
}

.article-content .post-message h2:first-child {
    margin-top: 0;
}

.article-content .post-message h3 {
    font-size: 1.3rem;
    line-height: 1.5;
    padding-bottom: 0;
    margin-top: 36px;
    margin-bottom: 16px;
}

.article-content .post-message h3::after {
    display: none;
}

.article-content .post-message h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e40af;
    margin: 20px 0 12px 0;
    line-height: 1.4;
}

.article-content .post-message p {
    margin-bottom: 28px;
    text-align: justify;
    hyphens: auto;
}

.article-content .post-message ul,
.article-content .post-message ol {
    background: #f8fafc;
    padding: 24px 24px 24px 48px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    margin: 28px 0;
    list-style: none;
}

.article-content .post-message li {
    margin-bottom: 16px;
    padding-left: 0;
    position: relative;
    line-height: 1.8;
}

.article-content .post-message li:last-child {
    margin-bottom: 0;
}

.article-content .post-message ul li::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 10px;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
    border-radius: 50%;
}

.article-content .post-message ol {
    counter-reset: list-counter;
}

.article-content .post-message ol li {
    counter-increment: list-counter;
    padding-left: 0;
}

.article-content .post-message ol li::before {
    content: counter(list-counter) '.';
    position: absolute;
    left: -24px;
    top: 0;
    font-weight: 700;
    color: #3b82f6;
}

.article-content .post-message li::marker {
    color: #3b82f6;
    font-weight: 700;
}

.article-content .post-message blockquote {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 4px solid #3b82f6;
    color: #1e293b;
    padding: 24px 32px;
    border-radius: 0 12px 12px 0;
    font-style: normal;
    font-size: 1.1rem;
    margin: 28px 0;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
}

.article-content .post-message a {
    color: #2563eb;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.article-content .post-message a:hover {
    color: #1d4ed8;
    border-bottom-color: #3b82f6;
}

/* Professional divider between sections */
.article-content .post-message hr {
    border: none;
    height: 2px;
    background: #3b82f6;
    margin: 48px 0;
}

.article-content .post-message code {
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.95em;
    color: #be123c;
}

.article-content .post-message pre {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #f9fafb;
    padding: 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 28px 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.article-content .post-message pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.article-content .post-message img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    margin: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {

    /* Article container */
    .article-container {
        padding: 0;
    }

    .article-wrapper {
        border-radius: 0;
        margin-bottom: 0;
    }

    /* Hero section */
    .article-hero {
        padding: 20px 16px;
    }

    .article-hero .article-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 16px;
    }

    .article-meta-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .article-author-info {
        gap: 10px;
    }

    .author-avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .author-name {
        font-size: 0.9rem;
    }

    .article-date {
        font-size: 0.8rem;
    }

    .article-stats {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    .stat-badge {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .article-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
        margin-top: 16px;
    }

    .btn-icon {
        padding: 8px 14px;
        font-size: 0.85rem;
    }

    /* Article content */
    .article-content {
        padding: 20px 16px;
    }

    .article-content .post-message {
        font-size: 1rem;
        line-height: 1.7;
    }

    .article-content .post-message h1 {
        font-size: 1.5rem;
        margin-top: 32px;
        margin-bottom: 16px;
        padding-bottom: 10px;
    }

    .article-content .post-message h2 {
        font-size: 1.3rem;
        margin-top: 28px;
        margin-bottom: 14px;
        padding-bottom: 8px;
    }

    .article-content .post-message h3 {
        font-size: 1.15rem;
        margin-top: 24px;
        margin-bottom: 12px;
    }

    .article-content .post-message h4 {
        font-size: 1rem;
        margin: 16px 0 10px 0;
    }

    .article-content .post-message p {
        margin-bottom: 20px;
    }

    .article-content .post-message ul,
    .article-content .post-message ol {
        padding: 16px 16px 16px 36px;
        margin: 20px 0;
    }

    .article-content .post-message li {
        margin-bottom: 12px;
        line-height: 1.7;
    }

    .article-content .post-message blockquote {
        padding: 16px 20px;
        margin: 20px 0;
        font-size: 1rem;
    }

    .article-content .post-message pre {
        padding: 16px;
        margin: 20px 0;
        font-size: 0.85rem;
    }

    .article-content .post-message img {
        border-radius: 0;
        margin: 0;
    }

    /* Banner image on mobile */
    .banner-image-container {
        margin: -20px -16px 0 -16px;
        width: calc(100% + 32px);
    }

    .banner-image-container:first-child {
        margin-top: -20px;
    }

    .banner-image {
        max-height: 300px;
    }

    /* Ticker styling on mobile */
    .article-content .post-message strong.ticker {
        padding: 2px 6px;
        font-size: 0.95em;
    }

    /* Image containers */
    .image-container {
        margin: 16px 0;
    }

    /* Replies section */
    .article-replies {
        padding: 24px 16px;
    }

    .article-replies h2 {
        font-size: 1rem;
        margin-bottom: 16px;
    }

    /* Reply form */
    .reply-form .form-control,
    .reply-form textarea {
        font-size: 16px;
        /* Prevents iOS zoom on focus */
    }

    /* Share toast */
    .share-toast {
        bottom: 20px;
        padding: 12px 20px;
        font-size: 0.9rem;
        max-width: calc(100% - 32px);
    }
}

/* Extra small screens (phones in portrait) */
@media (max-width: 480px) {
    .article-hero .article-title {
        font-size: 1.25rem;
    }

    .article-content .post-message {
        font-size: 0.95rem;
    }

    .article-content .post-message h1 {
        font-size: 1.35rem;
    }

    .article-content .post-message h2 {
        font-size: 1.2rem;
    }

    .article-content .post-message h3 {
        font-size: 1.1rem;
    }

    .article-stats {
        flex-wrap: wrap;
    }

    .stat-badge {
        padding: 5px 8px;
        font-size: 0.75rem;
    }

    .btn-icon {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .btn-icon span {
        display: none;
        /* Hide button text, show only icon */
    }
}

/* Replies Section */
.article-replies {
    margin-top: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
    padding: 40px 48px;
    border-top: none;
    border-radius: 0;
}

.article-replies h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.article-replies h2::before {
    display: none;
}

.replies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.reply-item {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: none;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reply-item:hover {
    background: white;
    border-left-color: #3b82f6;
    transform: translateX(4px);
}

.reply-item.card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: none;
    border-left: 3px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reply-item.card::before {
    display: none;
}

.reply-item.card:hover {
    transform: translateX(4px);
    background: white;
    border-left-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 0;
    border-bottom: none;
}

.reply-header strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #1f2937;
}

.reply-header small {
    color: #6b7280;
    font-size: 0.85rem;
}

.reply-message {
    color: #374151;
    line-height: 1.7;
}

.no-replies {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    padding: 40px 0;
    font-style: italic;
    background: transparent;
    border-radius: 0;
    border: none;
}

.reply-form-container {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.reply-form-container h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3b82f6;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.reply-form-container .form-control {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.reply-form-container .form-control:focus {
    background: white;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.reply-form-container .btn {
    background: #3b82f6;
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.reply-form-container .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.login-prompt {
    text-align: center;
    padding: 30px;
    color: var(--muted);
}

.login-prompt a {
    color: var(--accent);
    font-weight: 600;
}

/* Reply message content formatting */
.reply-message {
    line-height: 1.5;
    margin-top: 6px;
    word-wrap: break-word;
}

.reply-message .image-container {
    margin: 16px 0;
    text-align: left;
}

.reply-message h1,
.reply-message h2,
.reply-message h3 {
    margin: 12px 0 6px 0;
    font-weight: 700;
}

.reply-message h1 {
    font-size: 1.5rem;
}

.reply-message h2 {
    font-size: 1.3rem;
}

.reply-message h3 {
    font-size: 1.1rem;
}

.reply-message ul {
    margin: 8px 0;
    padding-left: 20px;
    list-style: none;
}

.reply-message li {
    margin: 2px 0;
}

.reply-message blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--muted);
    font-style: italic;
    display: block;
}

.reply-message a {
    color: var(--accent);
    text-decoration: underline;
}

.reply-message strong {
    font-weight: 700;
}

.reply-message em {
    font-style: italic;
}

.reply-message .image-container {
    margin: 16px 0;
    text-align: left;
}

.reply-message img.post-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
    border: 1px solid var(--border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

/* Legacy replies section (for compatibility) */
.replies-section {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-top: 12px
}

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

/* Related Posts Section */
/* ===========================================
   RELATED ARTICLES SECTION
   =========================================== */

.related-posts {
    margin-top: 64px;
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: linear-gradient(180deg, transparent 0%, rgba(59, 130, 246, 0.02) 100%);
}

.related-posts h2 {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.related-posts h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 20px;
    background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 2px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .related-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

.related-post-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.related-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

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

.related-post-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-post-card:hover h3 {
    color: #3b82f6;
}

.related-excerpt {
    color: var(--muted);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.related-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.related-author {
    font-weight: 600;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
}

.meta-dot {
    opacity: 0.4;
    font-size: 0.5rem;
}

.related-views {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.related-views::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M15 12a3 3 0 11-6 0 3 3 0 016 0z'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z'/%3E%3C/svg%3E");
    background-size: contain;
    opacity: 0.7;
}