/* ==========================================================================
   Optivis Insights (Ghost theme)
   The site-wide design system (/site/optivis.css) is loaded first from the main
   site, exactly as on every other page. This file only adds blog layouts, ported
   from the previous in-house blog, plus what Ghost's editor cards need.
   ========================================================================== */

/* ---- Blog layouts (carried over from the previous blog) ---- */
.ov-insights{width:100%;max-width:1080px;margin:0 auto;padding:0 22px 40px;box-sizing:border-box;font-family:Lato,"Helvetica Neue",Arial,sans-serif;}
.ov-insights h1,.ov-insights h2,.ov-insights h3{font-family:var(--font-display);}
.ov-insights-hero{margin:0 0 20px;padding:20px 0 4px;border-bottom:1px solid #e7e7e7;}
.ov-insights-hero h1{margin:0 0 10px;font-size:clamp(2rem,3.5vw,2.6rem);line-height:1.15;color:#B81D25;font-weight:500;}
.ov-insights-hero p{margin:0;max-width:640px;color:#4a5464;font-size:1.05rem;line-height:1.6;font-weight:300;}
.ov-featured{display:grid;grid-template-columns:1.1fr 1fr;gap:28px;margin-bottom:28px;background:#fff;border:1px solid #e7e7e7;border-radius:12px;overflow:hidden;box-shadow:0 8px 32px rgba(33,31,32,.06);}
.ov-featured-media{display:block;min-height:280px;background:#211F20;line-height:0;}
.ov-featured-media img{width:100%;height:100%;object-fit:cover;display:block;}
.ov-featured-body{padding:32px 28px;display:flex;flex-direction:column;gap:14px;justify-content:center;}
.ov-featured-kicker{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:#E50915;}
.ov-featured-title{margin:0;font-size:clamp(1.5rem,2.5vw,2rem);line-height:1.25;color:#211F20;}
.ov-featured-title a{color:inherit;text-decoration:none;}
.ov-featured-title a:hover{color:#E50915;}
.ov-featured-excerpt{margin:0;color:#4a5464;line-height:1.6;font-weight:300;}
.ov-featured-meta{font-size:13px;color:#4a5464;}
.ov-pillar-hero{margin-bottom:24px;padding:24px 22px;background:#211F20;color:#F5F6F1;border-radius:12px;}
.ov-pillar-hero h1{margin:0 0 10px;font-size:clamp(1.6rem,3vw,2.2rem);}
.ov-pillar-hero p{margin:0;color:#e7e7e7;line-height:1.65;font-weight:300;}
.ov-pillar-badge{display:inline-block;padding:4px 10px;border-radius:999px;background:#F5F6F1;color:#B81D25;font-size:10px;letter-spacing:.12em;text-transform:uppercase;font-weight:700;text-decoration:none;}
.ov-pillar-badge--dark{background:rgba(245,246,241,.12);color:#F5F6F1;border:1px solid rgba(245,246,241,.25);}
.ov-insights-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:30px;width:100%;}
.ov-card{display:flex;flex-direction:column;background:#fff;border:1px solid #e7e7e7;border-radius:10px;overflow:hidden;box-shadow:0 4px 22px rgba(33,31,32,.05);transition:transform .18s ease,box-shadow .18s ease;}
.ov-card:hover{transform:translateY(-4px);box-shadow:0 14px 34px rgba(33,31,32,.12);}
.ov-card-media{display:block;width:100%;aspect-ratio:16/10;overflow:hidden;background:#211F20;line-height:0;}
.ov-card-media img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s ease;}
.ov-card:hover .ov-card-media img{transform:scale(1.04);}
.ov-card-media--ph{display:flex;align-items:center;justify-content:center;background:radial-gradient(circle at 30% 30%,#3a3637,#1a1819);}
.ov-card-media--ph .ov-card-ph-logo{width:74px;height:74px;object-fit:contain;opacity:.92;border-radius:12px;}
.ov-card-body{display:flex;flex-direction:column;gap:11px;padding:22px 24px 26px;flex:1 1 auto;}
.ov-card-meta{display:flex;flex-wrap:wrap;gap:8px;align-items:center;font-size:11px;color:#4a5464;}
.ov-card-date{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:#E50915;}
.ov-card-title{margin:0;font-size:1.2rem;line-height:1.32;font-weight:700;color:#211F20;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
.ov-card-title a{color:inherit;text-decoration:none;}
.ov-card-title a:hover{color:#E50915;}
.ov-card-excerpt{margin:0;font-size:.94rem;line-height:1.55;color:#4a5464;font-weight:300;flex:1 1 auto;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}
.ov-card-more{margin-top:4px;font-size:11px;letter-spacing:.16em;text-transform:uppercase;font-weight:700;color:#E50915;text-decoration:none;}
.ov-pagination{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:36px;}
.ov-pagination a,.ov-pagination span{padding:8px 14px;border:1px solid #e7e7e7;border-radius:6px;font-size:13px;text-decoration:none;color:#211F20;background:#fff;}
.ov-pagination a:hover{border-color:#E50915;color:#E50915;}
.ov-pagination .ov-current{background:#211F20;color:#fff;border-color:#211F20;}
.ov-article-wrap{max-width:760px;margin:0 auto;padding:24px 22px 60px;font-family:Lato,sans-serif;color:#211F20;}
.ov-article-wrap h1,.ov-article-wrap h2,.ov-article-wrap h3{font-family:var(--font-display);}
.ov-article-header{margin-bottom:28px;}
.ov-article-header h1{margin:12px 0 14px;font-size:clamp(1.8rem,4vw,2.6rem);line-height:1.2;}
.ov-article-meta{display:flex;flex-wrap:wrap;gap:12px;align-items:center;font-size:14px;color:#4a5464;}
.ov-article-meta time{font-weight:700;color:#E50915;}
.ov-byline{display:flex;gap:14px;align-items:center;margin:24px 0;padding:16px 18px;background:#F5F6F1;border-radius:10px;}
.ov-byline img{width:52px;height:52px;border-radius:50%;object-fit:cover;background:#e7e7e7;}
.ov-byline-name{font-weight:700;color:#211F20;}
.ov-byline-role{font-size:13px;color:#4a5464;}
.ov-article-body{line-height:1.75;font-size:1.05rem;font-weight:300;}
.ov-article-body h2,.ov-article-body h3{margin:2em 0 .75em;line-height:1.3;color:#211F20;}
.ov-article-body h2{font-size:1.45rem;}
.ov-article-body h3{font-size:1.2rem;}
.ov-article-body p{margin:0 0 1.2em;}
.ov-article-body img{max-width:100%;height:auto;border-radius:8px;}
.ov-article-body blockquote,.ov-callout{margin:1.5em 0;padding:18px 22px;border-left:4px solid #E50915;background:#F5F6F1;border-radius:0 8px 8px 0;font-style:italic;color:#3e3e3e;}
.ov-article-body a{color:#B81D25;text-decoration:underline;}
.ov-article-body a:hover{color:#E50915;}
.ov-article-body pre{background:#211F20;color:#F5F6F1;padding:16px;border-radius:8px;overflow-x:auto;font-size:.9rem;}
.ov-article-body code{background:#F5F6F1;padding:2px 6px;border-radius:4px;font-size:.92em;}
.ov-cover{margin:0 0 28px;border-radius:12px;overflow:hidden;line-height:0;}
.ov-cover img{width:100%;height:auto;display:block;}
.ov-share{display:flex;flex-wrap:wrap;gap:10px;margin:32px 0;}
.ov-share a,.ov-share button{font-size:12px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;padding:10px 16px;border:1px solid #c4c4c4;border-radius:6px;background:#fff;color:#211F20;text-decoration:none;cursor:pointer;font-family:Lato,sans-serif;}
.ov-share a:hover,.ov-share button:hover{border-color:#E50915;color:#E50915;}
.ov-author-foot{margin:40px 0;padding:24px;background:#211F20;color:#F5F6F1;border-radius:12px;display:flex;gap:18px;align-items:flex-start;}
.ov-author-foot img{width:72px;height:72px;border-radius:50%;object-fit:cover;}
.ov-author-foot h2{margin:0 0 6px;font-size:1.2rem;color:#fff;}
.ov-author-foot p{margin:0 0 10px;line-height:1.6;font-weight:300;color:#e7e7e7;}
.ov-author-foot a{color:#F5F6F1;text-decoration:underline;}
.ov-related{margin-top:48px;padding-top:32px;border-top:1px solid #e7e7e7;}
.ov-related h2{font-size:1.4rem;margin:0 0 20px;}
.ov-newsletter{margin:36px 0;padding:28px 24px;background:linear-gradient(135deg,#211F20,#3a3637);color:#F5F6F1;border-radius:12px;}
.ov-newsletter h2{margin:0 0 8px;font-size:1.25rem;color:#fff;}
.ov-newsletter p{margin:0 0 16px;font-weight:300;line-height:1.55;color:#e7e7e7;}
.ov-newsletter-form{display:flex;flex-wrap:wrap;gap:10px;}
.ov-newsletter-form input[type=email]{flex:1 1 220px;min-width:180px;padding:12px 14px;border:1px solid #c4c4c4;border-radius:6px;font-size:15px;}
.ov-newsletter-form button{padding:12px 20px;background:#E50915;color:#fff;border:none;border-radius:6px;font-weight:700;cursor:pointer;text-transform:uppercase;letter-spacing:.1em;font-size:11px;}
.ov-newsletter-form button:hover{background:#B81D25;}
.ov-newsletter-msg{margin-top:10px;font-size:14px;}
.ov-newsletter-msg.ok{color:#9fdf9f;}
.ov-newsletter-msg.err{color:#ffb4b4;}
.ov-newsletter .ov-newsletter-legal{margin:12px 0 0;font-size:13px;color:#b5b5ae;}
.ov-newsletter-legal a{color:inherit;text-underline-offset:3px;}
.ov-newsletter-legal a:hover{color:#fff;}
.ov-byline-name a{color:inherit;text-decoration:none;}
.ov-byline-name a:hover{color:#E50915;}
.ov-toc{margin:0 0 32px;padding:20px 22px;border:1px solid #e7e7e7;border-left:3px solid #E50915;border-radius:0 10px 10px 0;background:#fff;}
.ov-toc h2{margin:0 0 10px;font-family:Lato,sans-serif!important;font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:#4a5464;}
.ov-toc ol{margin:0;padding-left:1.2em;display:grid;gap:6px;}
.ov-toc a{color:#211F20;text-decoration:none;line-height:1.45;background-image:linear-gradient(#E50915,#E50915);background-size:0 1px;background-position:0 100%;background-repeat:no-repeat;transition:background-size .3s ease,color .2s ease;}
.ov-toc a:hover{color:#B81D25;background-size:100% 1px;}
.ov-article-body h2,.ov-article-body h3{scroll-margin-top:110px;}
.ov-article-body h2:target,.ov-article-body h3:target{animation:ov-target 1.6s ease;}
@keyframes ov-target{0%{background:rgba(229,9,21,.12)}100%{background:transparent}}
.ov-cover img{animation:ov-cover-in 1.1s cubic-bezier(.22,1,.36,1) both;}
@keyframes ov-cover-in{from{transform:scale(1.06);filter:saturate(.6)}to{transform:none;filter:none}}
.ov-hp{position:absolute;left:-9999px;opacity:0;height:0;width:0;overflow:hidden;}
.ov-insights,.ov-article-wrap{animation:ov-blog-in .7s cubic-bezier(.22,1,.36,1) both;}
@keyframes ov-blog-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion:reduce){.ov-insights,.ov-article-wrap,.ov-cover img{animation:none}}
@media (max-width:768px){.ov-featured{grid-template-columns:1fr;}.ov-insights-grid{grid-template-columns:1fr;}}

/* ---- Topic chips (replace the old dropdown filters) ---- */
.ov-topics{margin:0 0 28px;}
.ov-topics-list{display:flex;flex-wrap:wrap;gap:10px;list-style:none;margin:0;padding:0;}
.ov-topics-list a{display:inline-block;padding:8px 16px;border:1px solid #e7e7e7;border-radius:999px;background:#fff;color:#211F20;font-size:13px;font-weight:700;letter-spacing:.04em;text-decoration:none;transition:border-color .2s ease,color .2s ease,background .2s ease;}
.ov-topics-list a:hover{border-color:#E50915;color:#E50915;}
.ov-topics-list a[aria-current="page"]{background:#211F20;border-color:#211F20;color:#fff;}

.ov-crumbs{font-size:13px;margin-bottom:16px;}
.ov-crumbs a{color:#B81D25;}
.ov-empty{grid-column:1/-1;text-align:center;color:#4a5464;padding:40px 0;}
.ov-pagination .ov-current{background:#211F20;color:#fff;border-color:#211F20;}
.ov-pillar-hero .ov-pillar-badge{margin-bottom:12px;}
.ov-author-hero{display:flex;gap:22px;align-items:flex-start;}
.ov-author-hero-img{width:88px;height:88px;border-radius:50%;object-fit:cover;flex:none;}
.ov-author-role{font-weight:700!important;color:#fff!important;margin-bottom:8px!important;}
.ov-author-links a{color:#F5F6F1;text-decoration:underline;}
.ov-cover figcaption{padding:10px 4px 0;font-size:13px;line-height:1.5;color:#4a5464;}
.ov-error-title{font-size:var(--fs-h1);margin-top:24px;}
.ov-error-lead{margin-top:18px;max-width:560px;}
.ov-error-actions{margin-top:32px;}

/* ---- Newsletter form states (Ghost members forms add loading/success/error classes) ---- */
.ov-newsletter-form .ov-newsletter-msg{display:none;flex-basis:100%;}
.ov-newsletter-form.success .ov-newsletter-msg.ok{display:block;}
.ov-newsletter-form.error .ov-newsletter-msg.err{display:block;}
.ov-newsletter-form .ov-btn-loading{display:none;}
.ov-newsletter-form.loading .ov-btn-idle{display:none;}
.ov-newsletter-form.loading .ov-btn-loading{display:inline;}
.ov-newsletter-form.success input,.ov-newsletter-form.success button{display:none;}

/* ---- Ghost editor content ---- */
.gh-content>*+*{margin-top:0;}
.gh-content ul,.gh-content ol{margin:0 0 1.2em;padding-left:1.4em;}
.gh-content li+li{margin-top:.4em;}
.gh-content hr{border:0;border-top:1px solid #e7e7e7;margin:2.4em 0;}
.gh-content figure{margin:2em 0;}
.gh-content figcaption{margin-top:10px;font-size:13px;line-height:1.5;color:#4a5464;text-align:center;}
.gh-content table{width:100%;border-collapse:collapse;margin:0 0 1.4em;font-size:.95rem;}
.gh-content th,.gh-content td{padding:10px 12px;border-bottom:1px solid #e7e7e7;text-align:left;}
.gh-content .kg-card{margin:2em 0;}
.gh-content .kg-image{margin:0 auto;}
.gh-content .kg-width-wide{position:relative;width:min(1040px,calc(100vw - 2 * var(--gutter)));left:50%;transform:translateX(-50%);max-width:none;}
.gh-content .kg-width-full{position:relative;width:100vw;left:50%;transform:translateX(-50%);max-width:none;}
.gh-content .kg-width-full img{border-radius:0;}
.gh-content .kg-callout-card{border-radius:10px;}
.gh-content .kg-bookmark-card a{text-decoration:none;}
.gh-content .kg-button-card a.kg-btn{border-radius:999px;text-decoration:none;}
.gh-content .kg-embed-card{display:flex;justify-content:center;}
.ov-article-body h2[id],.ov-article-body h3[id]{scroll-margin-top:110px;}

/* Members content gate (paid or members-only posts) */
.gh-post-upgrade-cta{margin:36px 0;padding:28px 24px;border-radius:var(--radius-lg);background:linear-gradient(135deg,#211F20,#3a3637)!important;color:#F5F6F1;text-align:center;}
.gh-post-upgrade-cta h2{color:#fff;font-family:var(--font-display);}
.gh-post-upgrade-cta a.gh-btn{display:inline-block;margin-top:14px;padding:12px 22px;border-radius:999px;background:#E50915;color:#fff!important;font-weight:700;text-decoration:none;}

@media (max-width:600px){.ov-author-hero{flex-direction:column;}}
