/* post-wide-18 — minimal centered article · gallery · lightbox · share (Ghost) */

:root {
    --text-main: #1d1d1f;
    --text-muted: #6e6e73;
    --accent-blue: #0066cc;
    --soft-bg: #f5f5f7;
    --line: #e5e5ea;
    --line-light: #eee;
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body.is-article-minimal { overflow-x: clip; }

.mn-wrap { font-family: var(--font); color: var(--text-main); line-height: 1.6; letter-spacing: -.011em; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.mn-wrap *, .mn-wrap *::before, .mn-wrap *::after { box-sizing: border-box; }
.mn-wrap img, .mn-wrap video, .mn-wrap iframe { max-width: 100%; }
.mn-wrap [hidden] { display: none !important; }
.mn-container { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
.mn-header { padding: clamp(40px, 7vw, 88px) 0 clamp(28px, 4.5vw, 48px); text-align: center; }
.mn-eyebrow { display: inline-block; margin: 0 0 18px; font-size: .75rem; font-weight: 600; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); text-decoration: none; transition: color .2s; }
.mn-eyebrow:hover { color: var(--text-main); }
.mn-title { margin: 0 auto 20px; font-size: clamp(2rem, 1.3rem + 3vw, 3.5rem); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; color: var(--text-main); text-wrap: balance; overflow-wrap: break-word; }
.mn-excerpt { max-width: 600px; margin: 0 auto 24px; font-size: clamp(1.0625rem, 1rem + .35vw, 1.1875rem); line-height: 1.55; color: var(--text-muted); text-wrap: pretty; }
.mn-meta { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 10px; font-size: .875rem; line-height: 1.5; color: var(--text-muted); }
.mn-meta a { color: var(--text-main); font-weight: 600; text-decoration: none; }
.mn-meta a:hover { text-decoration: underline; }
.dot-sep { opacity: .5; }

/* ---------- cover (never cropped) ---------- */
.mn-cover { margin: 0 0 48px; }
.mn-cover img { display: block; width: 100%; height: auto; max-height: 80vh; margin: 0 auto; object-fit: contain; border-radius: 12px; background: var(--soft-bg); }
.mn-cover figcaption { margin: 12px 8px 0; text-align: center; font-size: .875rem; line-height: 1.5; color: var(--text-muted); text-wrap: pretty; }
.mn-cover figcaption a { color: inherit; text-decoration: underline; }

/* ---------- article body ---------- */
.post-content { text-align: left; font-size: 1.125rem; line-height: 1.75; overflow-wrap: break-word; min-width: 0; }
.post-content > :first-child { margin-top: 0; }
.post-content p { margin: 0 0 1.4em; font-size: 1.125rem; line-height: 1.75; }
.post-content h2, .post-content h3, .post-content h4 { color: var(--text-main); font-weight: 700; letter-spacing: -.02em; }
.post-content h2 { margin: 2.2em 0 .7em; font-size: clamp(1.5rem, 1.25rem + 1vw, 1.875rem); line-height: 1.25; }
.post-content h3 { margin: 1.9em 0 .6em; font-size: clamp(1.25rem, 1.1rem + .6vw, 1.5rem); line-height: 1.3; }
.post-content h4 { margin: 1.6em 0 .55em; font-size: clamp(1.125rem, 1.05rem + .3vw, 1.25rem); line-height: 1.35; font-weight: 600; }
.post-content strong, .post-content b { font-weight: 600; }
.post-content ul, .post-content ol { margin: 0 0 1.5em; padding-left: 1.5em; }
.post-content li { margin: 0 0 .5em; font-size: 1.125rem; line-height: 1.7; }
.post-content li::marker { font-weight: 600; }
.post-content a { color: var(--accent-blue); text-decoration: none; }
.post-content a:hover { text-decoration: underline; }
.post-content blockquote { margin: 2em 0; padding: 22px 28px; border-left: 4px solid var(--accent-blue); border-radius: 0 8px 8px 0; background: #f8fafc; font-size: 1.125rem; line-height: 1.65; font-style: italic; }
.post-content hr { max-width: 120px; margin: 3em auto; border: 0; border-top: 1px solid var(--line); }
.post-content figure { margin: 2.4em 0; }
.post-content img { display: block; width: 100%; height: auto; border-radius: 12px; object-fit: contain; }
.post-content figcaption { margin: 12px 0 0; text-align: center; font-size: .875rem; line-height: 1.5; color: var(--text-muted); }
.post-content figcaption a { color: inherit; text-decoration: underline; }
.post-content pre { max-width: 100%; overflow-x: auto; font-size: .875rem; line-height: 1.6; }
.post-content code { max-width: 100%; }
.post-content table { display: block; max-width: 100%; overflow-x: auto; }
.post-content .kg-width-wide, .post-content .kg-width-full { position: relative; left: 50%; width: min(960px, calc(100vw - 48px)); max-width: none; transform: translateX(-50%); }
.post-content .kg-width-full { width: min(1200px, calc(100vw - 48px)); }
.post-content .kg-embed-card { display: flex; flex-direction: column; align-items: center; }
.post-content .kg-embed-card iframe { width: 100%; }

/* Ghost editor cards */
.kg-bookmark-card { margin: 2em 0; }
.kg-bookmark-container { display: flex; min-height: 120px; color: inherit; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.post-content .kg-bookmark-container { text-decoration: none; }
.kg-bookmark-content { flex: 1; min-width: 0; padding: 18px 20px; }
.kg-bookmark-title { font-size: 1rem; font-weight: 600; line-height: 1.35; }
.kg-bookmark-description { margin-top: 6px; max-height: 3em; overflow: hidden; font-size: .875rem; line-height: 1.5; color: var(--text-muted); }
.kg-bookmark-metadata { display: flex; align-items: center; margin-top: 12px; font-size: .8125rem; color: var(--text-muted); }
.kg-bookmark-icon { width: 20px; height: 20px; margin-right: 8px; border-radius: 4px; }
.kg-bookmark-thumbnail { position: relative; flex: 0 0 32%; }
.post-content .kg-bookmark-thumbnail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.kg-button-card { display: flex; justify-content: center; margin: 2em 0; }
.kg-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border-radius: 999px; background: var(--text-main); color: #fff !important; font-weight: 600; text-decoration: none !important; }
.kg-toggle-card { padding: 16px 20px; border: 1px solid var(--line); border-radius: 12px; }
.kg-video-card video, .kg-audio-card audio { width: 100%; height: auto; }

/* ---------- images, gallery (1–2 normal · 3 slideshow · 4+ grid) — from custom-post-wide-13-1 ---------- */
.kg-image-card, .kg-gallery-card, .ghost-injected-slideshow, .ghost-injected-grid { width: 100%; margin: 40px 0 }
.kg-image-card img, .kg-gallery-image img { display: block; width: 100%; height: auto; border-radius: 12px !important }
.kg-gallery-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 20px !important }
.kg-gallery-image img { object-fit: cover }
.ghost-injected-slideshow { position: relative; z-index: 0; isolation: isolate }
.slideshow-viewport { position: relative; z-index: 0; isolation: isolate; width: 100%; overflow: hidden; border-radius: 12px; background: #f3f4f6 }
.slideshow-track { display: flex; width: 100%; transition: transform .45s ease }
.slideshow-slide { flex: 0 0 100%; width: 100%; cursor: pointer }
.slideshow-slide img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover }
.slideshow-counter { position: absolute; bottom: 14px; right: 15px; top: auto; z-index: 2; pointer-events: none; line-height: 1; padding: 6px 12px; border-radius: 20px; background: rgba(0, 0, 0, .65); color: #ffffff; font-size: 13px; font-weight: 600 }
.slideshow-arrow, .lightbox-arrow, .lightbox-close { position: absolute; display: flex; align-items: center; justify-content: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer; z-index: 2 }
.slideshow-arrow, .lightbox-arrow { top: 50%; transform: translateY(-50%) }
.slideshow-arrow { width: 46px; height: 46px; z-index: 3; background: rgba(255, 255, 255, .92); color: #111827; box-shadow: 0 5px 20px rgba(0, 0, 0, .15) }
.slideshow-arrow:hover { transform: translateY(-50%) scale(1.08); background: #ffffff }
.slideshow-arrow svg { width: 22px; height: 22px }
.slideshow-arrow-prev { left: 18px }
.slideshow-arrow-next { right: 18px }
.slideshow-dots { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 8px; z-index: 2 }
.slideshow-dot { width: 9px; height: 9px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .55); cursor: pointer }
.slideshow-dot.active { background: #ffffff; transform: scale(1.35) }
.ghost-injected-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px }
.grid-gallery-item { min-width: 0; overflow: hidden; border-radius: 12px; cursor: pointer }
.grid-gallery-item img { display: block; width: 100%; height: 100%; min-height: 260px; object-fit: cover; transition: transform .35s ease }
.grid-gallery-item:hover img { transform: scale(1.03) }

/* ---------- lightbox — from custom-post-wide-13-1 ---------- */
.premium-lightbox { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; background: rgba(0, 0, 0, .92); opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease }
.premium-lightbox.active { opacity: 1; visibility: visible }
.lightbox-content-wrapper { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 70px 90px }
.lightbox-image-viewport { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center }
.lightbox-image-viewport img { display: block; max-width: 90vw; max-height: 85vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; user-select: none }
.lightbox-close, .lightbox-arrow { color: #ffffff }
.lightbox-close { top: 25px; right: 30px; width: 46px; height: 46px; background: rgba(255, 255, 255, .12) }
.lightbox-arrow { width: 52px; height: 52px; background: rgba(255, 255, 255, .14) }
.lightbox-close:hover { background: rgba(255, 255, 255, .25) }
.lightbox-arrow:hover { background: rgba(255, 255, 255, .25); transform: translateY(-50%) scale(1.08) }
.lightbox-arrow svg { width: 25px; height: 25px }
.lightbox-arrow-prev { left: 25px }
.lightbox-arrow-next { right: 25px }
.lightbox-counter { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); z-index: 10; padding: 7px 14px; border-radius: 20px; background: rgba(0, 0, 0, .55); color: #ffffff; font-size: 13px; font-weight: 600 }

/* ---------- footer: tags, share, author (article-footer partial) ---------- */
.article-footer-area { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.article-footer-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.tag-pill, .share-pill { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; margin: 0 10px 10px 0; padding: 0 18px; border: 0; border-radius: 999px; background: #e5e7eb; font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2; color: #1f2937; white-space: nowrap; text-decoration: none; cursor: pointer; transition: background .2s; }
.tag-pill:hover, .share-pill:hover { background: #d1d5db; }
.author-boxes { margin-top: 28px; }
.author-box { display: flex; align-items: center; gap: 22px; margin-top: 28px; padding: 32px; border-radius: 12px; background: #f9fafb; }
.author-boxes .author-box { margin-top: 0; }
.author-box-avatar { display: block; width: 60px; height: 60px; flex: none; border-radius: 50%; object-fit: cover; background: #e5e7eb; }
.author-box-info { flex: 1; min-width: 0; }
.author-box-name { margin: 0 0 6px; font-size: 1.25rem; font-weight: 700; line-height: 1.3; }
.author-box-bio { margin: 0 0 14px; font-size: .9375rem; line-height: 1.55; color: var(--text-muted); }
.author-name-link, .author-link { color: inherit; text-decoration: none; }
.author-name-link:hover, .author-link:hover { color: var(--accent-blue); }
.social-icons { display: flex; gap: 12px; }
.social-icon-btn { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #e5e7eb; color: #4b5563; text-decoration: none; transition: background .2s; }
.social-icon-btn:hover { background: #d1d5db; color: var(--text-main); }
.author-boxes.is-multiple { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.author-boxes.is-multiple .author-box { align-items: flex-start; gap: 16px; padding: 20px; }
.author-boxes.is-multiple .author-box-avatar { width: 48px; height: 48px; }
.author-boxes.is-multiple .author-box-name { margin-bottom: 4px; font-size: 1.0625rem; }
.author-boxes.is-multiple .author-box-bio { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; font-size: .875rem; line-height: 1.5; }
.is-nonauthor [class*="author-box"], .is-nonauthor .author-boxes, .is-nonauthor .related-author, .is-nonauthor .related-meta .meta-dot { display: none !important; }

/* ---------- related articles ---------- */
.mn-related { max-width: 1000px; margin: 0 auto; padding: 0 24px 80px; }
.mn-related-rule { max-width: 760px; margin: 64px auto 48px; border: 0; border-top: 1px solid var(--line); }
.related-posts-bottom-title { margin: 0 0 28px; text-align: center; font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-muted); }
.related-posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.related-post-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; background: #fff; border: 1px solid var(--line-light); border-radius: 10px; transition: transform .3s, box-shadow .3s; }
.related-post-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.06); }
.related-post-link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.related-image-wrap { overflow: hidden; }
.related-thumb { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.related-info { display: flex; flex-direction: column; flex: 1; padding: 16px; }
.related-tag { display: inline-block; margin-bottom: 6px; font-size: .65rem; font-weight: 600; text-transform: uppercase; color: #3b82f6; }
.related-title { margin: 0 0 10px; font-size: 1rem; font-weight: 600; line-height: 1.35; color: #111827; }
.related-meta { display: flex; align-items: center; gap: 5px; margin-top: auto; font-size: .75rem; color: #6b7280; }
.meta-dot { opacity: .5; }

/* ---------- share modal (partial) ---------- */
.share-modal-overlay { position: fixed; inset: 0; z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility .3s; }
.share-modal-overlay.active { opacity: 1; visibility: visible; pointer-events: auto; }
.share-modal-card { position: relative; width: 100%; max-width: 420px; max-height: calc(100dvh - 40px); overflow-y: auto; padding: 24px; border-radius: 16px; background: #fff; box-shadow: 0 20px 40px rgba(0,0,0,.1); transform: translateY(20px); transition: transform .3s; }
.share-modal-overlay.active .share-modal-card { transform: none; }
.share-modal-header { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 24px; }
.share-modal-title { margin: 0; font-size: 1.125rem; font-weight: 700; color: #111827; }
.share-modal-close { flex: none; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #f3f4f6; color: #6b7280; cursor: pointer; }
.share-modal-close:hover { background: #e5e7eb; color: #111827; }
.share-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.share-item { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 0; border: 0; background: none; color: inherit; text-align: center; text-decoration: none; cursor: pointer; transition: transform .2s; }
.share-item:hover { transform: translateY(-3px); }
.share-icon-wrap { flex: none; display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; color: #fff; }
.share-label { width: 100%; font-size: .6875rem; font-weight: 500; line-height: 1.2; color: #4b5563; word-break: break-word; }
.bg-facebook { background: #1877f2; }
.bg-x, .bg-threads { background: #000; }
.bg-linkedin { background: #0a66c2; }
.bg-email { background: #ea4335; }
.bg-whatsapp { background: #25d366; }
.bg-telegram { background: #08c; }
.bg-more { background: #9ca3af; }
.share-divider { height: 1px; margin: 24px 0; background: #f3f4f6; }
.share-link-section { display: flex; flex-direction: column; gap: 8px; }
.share-link-label { font-size: .8125rem; font-weight: 600; color: #6b7280; }
.share-link-input-group { display: flex; gap: 8px; }
.share-link-input { flex: 1; min-width: 0; padding: 10px 14px; border: 1px solid #e5e7eb; border-radius: 10px; background: #f9fafb; font-size: .8125rem; color: #4b5563; outline: none; }
.share-copy-btn { flex: none; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 0 16px; border: 0; border-radius: 10px; background: #111827; color: #fff; font-size: .8125rem; font-weight: 600; cursor: pointer; }
.share-copy-btn:hover { background: #374151; }

/* ---------- tablet ---------- */
@media (max-width: 900px) {
    .related-posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .post-content .kg-width-wide, .post-content .kg-width-full { left: 0; width: 100%; transform: none; }
}

/* ---------- phone ---------- */
@media (max-width: 600px) {
    .mn-container { padding: 0 20px; }
    .mn-header { padding: 28px 0 24px; }
    .mn-eyebrow { margin-bottom: 14px; letter-spacing: .12em; }
    .mn-title { margin-bottom: 14px; letter-spacing: -.025em; }
    .mn-excerpt { margin-bottom: 18px; }
    .mn-meta { font-size: .8125rem; }
    .mn-cover { margin: 0 -4px 32px; }
    .mn-cover img, .post-content img { border-radius: 10px; }
    .mn-cover figcaption { margin: 10px 4px 0; font-size: .8125rem; }
    .post-content, .post-content p, .post-content li { font-size: 1.0625rem; }
    .post-content p { line-height: 1.7; margin-bottom: 1.3em; }
    .post-content h2 { margin-top: 1.9em; }
    .post-content figure { margin: 1.8em 0; }
    .post-content .kg-bookmark-container { flex-direction: column-reverse; }
    .post-content .kg-bookmark-thumbnail { flex: none; aspect-ratio: 16 / 9; }
    .kg-image-card, .kg-gallery-card, .ghost-injected-slideshow, .ghost-injected-grid { margin: 30px 0; }
    .kg-image-card img, .kg-gallery-image img { border-radius: 10px !important; }
    .kg-gallery-row { grid-template-columns: 1fr !important; gap: 14px !important; }
    .slideshow-slide img { aspect-ratio: 4 / 3; }
    .slideshow-arrow { width: 38px; height: 38px; }
    .slideshow-arrow-prev { left: 9px; }
    .slideshow-arrow-next { right: 9px; }
    .slideshow-arrow svg { width: 18px; height: 18px; }
    .slideshow-counter { top: auto; bottom: 10px; right: 10px; padding: 5px 10px; font-size: 12px; }
    .slideshow-dots { bottom: 12px; gap: 7px; }
    .slideshow-dot { width: 8px; height: 8px; }
    .ghost-injected-grid { grid-template-columns: 1fr; gap: 14px; }
    .grid-gallery-item img { min-height: 0; aspect-ratio: 4 / 3; }
    .lightbox-content-wrapper { padding: 60px 12px; }
    .lightbox-image-viewport img { max-width: 94vw; max-height: 78vh; max-height: 78dvh; border-radius: 5px; }
    .lightbox-close { top: 12px; right: 12px; width: 40px; height: 40px; }
    .lightbox-arrow { width: 40px; height: 40px; }
    .lightbox-arrow-prev { left: 8px; }
    .lightbox-arrow-next { right: 8px; }
    .lightbox-arrow svg { width: 20px; height: 20px; }
    .lightbox-counter { bottom: 15px; padding: 6px 12px; font-size: 12px; }
    .article-footer-area { margin-top: 40px; padding-top: 22px; }
    .tag-pill, .share-pill { min-height: 40px; padding: 0 16px; margin: 0 8px 8px 0; }
    .author-box { flex-direction: column; text-align: center; padding: 22px 16px; gap: 12px; }
    .social-icons { justify-content: center; }
    .author-boxes.is-multiple { grid-template-columns: 1fr; }
    .author-boxes.is-multiple .author-box { flex-direction: row; text-align: left; padding: 16px; }
    .author-boxes.is-multiple .social-icons { justify-content: flex-start; }
    .mn-related { padding: 0 20px 48px; }
    .mn-related-rule { margin: 44px auto 36px; }
    .related-posts-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .related-posts-bottom-title { margin-bottom: 20px; }
    .share-modal-card { padding: 20px 16px; }
    .share-grid { gap: 10px; }
}

@media (hover: none) {
    .share-item:hover, .related-post-card:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .slideshow-track, .related-post-card { transition: none; }
}
