/* blog-show styles. Extracted from blog/show.blade.php. */

/* =====================================================
   BLOG DETAIL — Page Specific Styles
   ===================================================== */

/* Reading progress */
.h-reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--accent));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* =====================================================
   1. ARTICLE HERO
   ===================================================== */
.h-art-hero {
    position: relative;
    padding: 64px 0 56px;
    background: var(--bg-white);
    overflow: hidden;
    border-bottom: 1px solid var(--border-light);
}
.h-hero__grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse at center, #000 25%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 70%);
    z-index: 0;
}
.h-hero__glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; filter: blur(120px); opacity: 0.22; z-index: 0; pointer-events: none; }
.h-hero__glow--a { background: var(--primary-light); top: -180px; right: -100px; }
.h-hero__glow--b { background: var(--accent); bottom: -220px; left: -100px; opacity: .16; }
[dir="rtl"] .h-hero__glow--a { right: auto; left: -100px; }
[dir="rtl"] .h-hero__glow--b { left: auto; right: -100px; }

.h-art-hero__inner {
    position: relative; z-index: 1;
    /* 1080 (cover image) + 2x16 container padding = left edge aligns with the cover image below */
    max-width: 1112px;
}

/* Breadcrumb */
.h-art-crumbs {
    display: flex; flex-wrap: wrap;
    gap: 8px; align-items: center;
    font-size: 13px;
    margin-bottom: 24px;
}
.h-art-crumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color .2s ease;
    font-weight: 500;
}
.h-art-crumbs a:hover { color: var(--primary); }
.h-art-crumbs__sep { color: var(--border-medium); font-weight: 600; }
.h-art-crumbs__current { color: var(--text-medium); font-weight: 600; }

/* Meta row */
.h-art-meta {
    display: flex; flex-wrap: wrap;
    gap: 10px 16px;
    align-items: center;
    margin-bottom: 18px;
}
.h-art-cat {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 999px;
    font-size: 12px; font-weight: 700;
    text-decoration: none;
    text-transform: uppercase; letter-spacing: 0.06em;
    box-shadow: 0 4px 12px rgba(30,64,175,.22);
    transition: all .25s var(--h-ease);
}
.h-art-cat:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(30,64,175,.30); }
.h-art-cat i { font-size: 11px; }
.h-art-meta__item {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px;
    color: var(--text-light);
    font-weight: 500;
}
.h-art-meta__item i { font-size: 12px; }

/* Title */
.h-art-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.025em;
    color: var(--text-dark);
    margin: 0 0 22px;
}

/* Lede */
.h-art-lede {
    font-size: 19px;
    line-height: 1.6;
    color: var(--text-medium);
    margin: 0 0 28px;
    max-width: 720px;
    font-weight: 400;
}

/* Byline */
.h-art-byline {
    display: flex; align-items: center;
    gap: 14px;
    padding-top: 22px;
    border-top: 1px solid var(--border-light);
}
.h-art-avatar {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px;
    flex-shrink: 0;
    box-shadow: 0 6px 16px rgba(30,64,175,.20);
}
.h-art-byline__info { min-width: 0; }
.h-art-byline__name {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.3;
}
.h-art-byline__date {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 2px;
}
.h-art-byline__date i { font-size: 11px; }

@media (max-width: 640px) {
    .h-art-hero { padding: 40px 0; }
    .h-art-title { font-size: 28px; }
    .h-art-lede { font-size: 16px; margin-bottom: 22px; }
}

/* =====================================================
   2. FEATURED IMAGE (full-width cover)
   ===================================================== */
.h-art-cover-wrap {
    padding-top: 36px;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}
.h-art-cover {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(15,23,42,.10);
    aspect-ratio: 16 / 9;
    background: var(--bg-light);
}
.h-art-cover img {
    width: 100%; height: 100%;
    object-fit: cover;
}
@media (max-width: 640px) {
    .h-art-cover-wrap { padding-top: 24px; }
    .h-art-cover { border-radius: 14px; }
}

/* =====================================================
   3. ARTICLE BODY + TOC
   ===================================================== */
.h-art-section { padding: 64px 0 80px; }
.h-art-grid {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}
.h-art-body { max-width: 760px; min-width: 0; }
@media (max-width: 992px) {
    .h-art-grid { grid-template-columns: 1fr; gap: 0; }
}

/* TOC sticky sidebar */
.h-toc {
    position: sticky;
    top: 96px;
    align-self: start;
}
.h-toc__inner {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 22px 20px;
    box-shadow: var(--h-card-shadow);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}
.h-toc__title {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 700;
    color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin: 0 0 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.h-toc__title i { font-size: 12px; }
.h-toc__list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 8px;
}
.h-toc__list li { margin: 0; }
.h-toc__list a {
    display: block;
    padding: 6px 10px;
    font-size: 13.5px;
    line-height: 1.45;
    color: var(--text-medium);
    text-decoration: none;
    border-radius: 6px;
    transition: all .2s ease;
    border-left: 2px solid transparent;
}
[dir="rtl"] .h-toc__list a { border-left: none; border-right: 2px solid transparent; }
.h-toc__list a:hover {
    background: var(--bg-light);
    color: var(--primary);
    border-color: var(--primary-light);
}
.h-toc__list a.is-active {
    background: rgba(59,130,246,.08);
    color: var(--primary);
    font-weight: 600;
    border-color: var(--primary);
}
.h-toc__list a.toc-h3 {
    margin-left: 16px;
    font-size: 12.5px;
    color: var(--text-light);
}
[dir="rtl"] .h-toc__list a.toc-h3 { margin-left: 0; margin-right: 16px; }
@media (max-width: 992px) {
    .h-toc { position: static; margin-bottom: 32px; }
    .h-toc__inner { max-height: none; }
}

/* Prose (article body styles) */
.h-prose {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-dark);
}
.h-prose h2 {
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    color: var(--text-dark);
    margin: 48px 0 18px;
    line-height: 1.25;
    letter-spacing: -0.015em;
    scroll-margin-top: 100px;
}
.h-prose h3 {
    font-size: clamp(20px, 2.4vw, 24px);
    font-weight: 700;
    color: var(--text-dark);
    margin: 36px 0 14px;
    line-height: 1.3;
    letter-spacing: -0.01em;
    scroll-margin-top: 100px;
}
.h-prose h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 28px 0 10px;
    line-height: 1.35;
}
.h-prose p { margin: 0 0 22px; color: var(--text-medium); }
.h-prose p:first-of-type::first-letter {
    /* Subtle drop-cap-ish: not actual drop cap, just a stronger first line */
}
.h-prose a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}
.h-prose a:hover { color: var(--primary-dark); }
.h-prose strong, .h-prose b { color: var(--text-dark); font-weight: 700; }
.h-prose em, .h-prose i { font-style: italic; }
.h-prose ul, .h-prose ol {
    margin: 0 0 22px;
    padding-inline-start: 22px;
    color: var(--text-medium);
}
.h-prose li { margin-bottom: 10px; line-height: 1.75; }
.h-prose li::marker { color: var(--primary); }

.h-prose blockquote {
    margin: 32px 0;
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(59,130,246,.04), rgba(96,165,250,.04));
    border-inline-start: 4px solid var(--primary);
    border-radius: 0 12px 12px 0;
    font-size: 18px;
    line-height: 1.7;
    color: var(--text-medium);
    font-style: italic;
    position: relative;
}
[dir="rtl"] .h-prose blockquote { border-radius: 12px 0 0 12px; }
.h-prose blockquote p { margin: 0; color: var(--text-medium); }
.h-prose blockquote::before {
    content: '\201C';
    position: absolute;
    top: -8px; left: 14px;
    font-family: Georgia, serif;
    font-size: 60px;
    color: var(--primary-light);
    opacity: 0.4;
    line-height: 1;
}
[dir="rtl"] .h-prose blockquote::before { left: auto; right: 14px; }

.h-prose pre {
    background: #0f172a;
    color: #e5e7eb;
    padding: 22px 24px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 28px 0;
    font-size: 13.5px;
    line-height: 1.65;
    box-shadow: 0 8px 24px rgba(15,23,42,.18);
}
.h-prose pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.h-prose code {
    background: rgba(59,130,246,.10);
    color: var(--primary);
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.9em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 600;
}
.h-prose img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 32px 0;
    box-shadow: 0 12px 32px rgba(15,23,42,.10);
}
.h-prose hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-medium), transparent);
    margin: 40px 0;
}
.h-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 28px 0;
    font-size: 14.5px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
}
.h-prose th, .h-prose td {
    padding: 12px 16px;
    text-align: start;
    border-bottom: 1px solid var(--border-light);
}
.h-prose th { background: var(--bg-light); font-weight: 700; color: var(--text-dark); }
.h-prose tr:last-child td { border-bottom: none; }

/* =====================================================
   TAGS + SHARE
   ===================================================== */
.h-art-tags {
    margin-top: 48px;
    padding-top: 28px;
    border-top: 1px solid var(--border-light);
    display: flex; flex-wrap: wrap;
    align-items: center;
    gap: 14px;
}
.h-art-tags__label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.08em;
}
.h-art-tags__label i { font-size: 11px; color: var(--primary); }
.h-art-tags__list { display: flex; flex-wrap: wrap; gap: 8px; }
.h-art-tag {
    padding: 6px 14px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    color: var(--text-medium);
    border-radius: 999px;
    font-size: 12.5px; font-weight: 600;
    text-decoration: none;
    transition: all .25s var(--h-ease);
}
.h-art-tag:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    transform: translateY(-1px);
}

.h-share {
    margin-top: 32px;
    padding: 22px 24px;
    background: var(--bg-light);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
}
.h-share__label {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 700;
    color: var(--text-dark);
}
.h-share__label i { color: var(--primary); }
.h-share__icons { display: flex; gap: 8px; }
.h-share__icon {
    width: 38px; height: 38px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    color: var(--text-medium);
    border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: all .25s var(--h-ease);
}
.h-share__icon:hover { transform: translateY(-2px); box-shadow: var(--h-card-shadow); }
.h-share__icon--x:hover { background: #0f172a; color: #fff; border-color: #0f172a; }
.h-share__icon--li:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.h-share__icon--fb:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.h-share__icon--em:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.h-share__icon--copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.h-share__icon--copy.is-copied { background: #10b981; color: #fff; border-color: #10b981; }

/* =====================================================
   AUTHOR BIO
   ===================================================== */
.h-author-section { padding: 60px 0; background: var(--bg-light); }
.h-author-wrap { max-width: 880px; }
.h-author {
    display: flex; align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 18px;
    box-shadow: var(--h-card-shadow);
}
.h-author__avatar {
    width: 88px; height: 88px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 32px;
    flex-shrink: 0;
    box-shadow: 0 12px 28px rgba(30,64,175,.25);
}
.h-author__body { flex-grow: 1; min-width: 0; }
.h-author__role {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.08em;
    margin-bottom: 4px;
}
.h-author__name { font-size: 22px; font-weight: 800; color: var(--text-dark); margin: 0 0 8px; letter-spacing: -0.01em; }
.h-author__bio { font-size: 14.5px; line-height: 1.65; color: var(--text-light); margin: 0 0 16px; }
@media (max-width: 640px) {
    .h-author { flex-direction: column; align-items: flex-start; gap: 16px; padding: 24px; }
    .h-author__avatar { width: 72px; height: 72px; font-size: 28px; }
}

/* =====================================================
   COMMENTS section spacing
   ===================================================== */
.h-comments-section { padding: 64px 0; background: var(--bg-white); }
.h-comments-wrap { max-width: 880px; }

/* =====================================================
   RELATED POSTS
   ===================================================== */
.h-related { padding: 0; }
.h-related__media {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
}
.h-related__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--h-ease); }
.h-related:hover .h-related__media img { transform: scale(1.06); }
.h-related__fallback {
    width: 100%; height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.5);
    font-size: 40px;
}
.h-related__body { padding: 22px 24px; display: flex; flex-direction: column; flex-grow: 1; }
.h-related__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.h-post__cat {
    padding: 4px 10px;
    background: rgba(59,130,246,.08);
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
}
.h-related__meta-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-light); }
.h-related__meta-item i { font-size: 11px; }
.h-related__title { font-size: 17px; font-weight: 700; line-height: 1.35; margin: 0 0 10px; letter-spacing: -0.01em; }
.h-related__title a { color: var(--text-dark); text-decoration: none; transition: color .2s ease; }
.h-related__title a:hover { color: var(--primary); }
.h-related__excerpt { font-size: 14px; line-height: 1.6; color: var(--text-light); margin: 0 0 14px; flex-grow: 1; }
