/* =====================================================================
   ANEKOR – blog-detail.css  (Single blog article page)
   Load AFTER style.css and layout.animations.css (re-uses its @keyframes
   anFadeUp and anLeft):
       <link href="css/style.css" rel="stylesheet">
       <link href="css/layout.animations.css" rel="stylesheet">
       <link href="css/blog-detail.css" rel="stylesheet">
   ===================================================================== */

/********** Reading progress bar **********/
.bd-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left center;
    z-index: 1100;
    pointer-events: none;
}

/********** Article Hero **********/
/* The wrapper uses the same grey as the article section, so the slanted
   bottom edge of the hero blends straight into the page below it. */
.bd-hero-wrap {
    background: var(--secondary);
}

.bd-hero {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    color: #FFFFFF;
    padding: 4rem 0 8rem;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - 64px), 0 100%);
}

.bd-hero-inner {
    position: relative;
    z-index: 2;
}

.bd-hero .breadcrumb {
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 15px;
}

.bd-hero .breadcrumb-item a {
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
}

.bd-hero .breadcrumb-item a:hover {
    color: #FFFFFF;
    text-decoration: underline;
}

.bd-hero .breadcrumb-item.active {
    color: #FFFFFF;
}

.bd-hero .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, .4);
}

/* the long article title is cut with "..." so the breadcrumb stays on one line */
.bd-crumb-title {
    min-width: 0;
    max-width: 28ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bd-cat {
    display: inline-block;
    margin-bottom: 1.1rem;
    padding: .4rem .9rem;
    background: var(--primary);
    color: #FFFFFF;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-radius: 30px;
}

.bd-hero-title {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1.12;
    letter-spacing: -.01em;
    color: #FFFFFF;
    max-width: 21em;
    margin-bottom: 1.25rem;
}

.bd-hero-lead {
    max-width: 38em;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
    margin-bottom: 1.25rem;
}

.bd-hero-date {
    margin: 0;
    font-family: 'Barlow', sans-serif;
    font-size: 15px;
    color: rgba(255, 255, 255, .65);
}

.bd-hero-date i {
    color: var(--primary);
}

/* Slanted bars echo the skewed teal shape in the top bar */
.bd-hero-bars {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(44%, 560px);
    z-index: 1;
    pointer-events: none;
}

.bd-hero-bars span {
    position: absolute;
    top: -10%;
    bottom: -10%;
    transform: skewX(-20deg);
    animation: bdBarsIn .9s cubic-bezier(.2, .7, .2, 1) both;
}

.bd-hero-bars span:nth-child(1) {
    right: 4%;
    width: 110px;
    background: var(--primary);
}

.bd-hero-bars span:nth-child(2) {
    right: 16%;
    width: 30px;
    background: rgba(255, 255, 255, .12);
    animation-delay: .12s;
}

.bd-hero-bars span:nth-child(3) {
    right: 23%;
    width: 190px;
    background: rgba(27, 158, 147, .22);
    animation-delay: .24s;
}

@keyframes bdBarsIn {
    from {
        opacity: 0;
        transform: translateX(70px) skewX(-20deg);
    }

    to {
        opacity: 1;
        transform: translateX(0) skewX(-20deg);
    }
}

@media (max-width: 767.98px) {
    .bd-hero {
        padding: 2.75rem 0 5.5rem;
        clip-path: polygon(0 0, 100% 0, 100% calc(100% - 36px), 0 100%);
    }

    .bd-hero-bars {
        width: 70%;
        opacity: .5;
    }

    .bd-hero-lead {
        font-size: 1rem;
    }

    .bd-crumb-title {
        max-width: 14ch;
    }
}

/********** Article layout **********/
.bd-section {
    background: var(--secondary);
}

.bd-article {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 6px;
    padding: 2rem;
    overflow: hidden;
}

@media (min-width: 768px) {
    .bd-article {
        padding: 2.75rem 3rem;
    }
}

.bd-featured {
    margin: 0 0 2rem;
    border-radius: 6px;
    overflow: hidden;
    background: #e9ecef;
}

.bd-featured img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 480px;
    object-fit: cover;
}

/********** Article content (HTML from the admin editor) **********/
.bd-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #444B55;
    overflow-wrap: break-word;
}

.bd-content>*:first-child {
    margin-top: 0;
}

.bd-content p {
    margin-bottom: 1.4rem;
}

.bd-content h2,
.bd-content h3,
.bd-content h4 {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.25;
}

.bd-content h2 {
    font-size: 1.75rem;
    margin: 2.5rem 0 1rem;
    padding-left: .9rem;
    border-left: 4px solid var(--primary);
}

.bd-content h3 {
    font-size: 1.4rem;
    margin: 2rem 0 .85rem;
}

.bd-content h4 {
    font-size: 1.15rem;
    margin: 1.75rem 0 .75rem;
}

.bd-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.bd-content a:hover {
    color: var(--dark);
}

.bd-content ul,
.bd-content ol {
    margin: 0 0 1.5rem;
    padding-left: 1.4rem;
}

.bd-content li {
    margin-bottom: .55rem;
    padding-left: .25rem;
}

.bd-content ul li::marker {
    color: var(--primary);
}

.bd-content ol li::marker {
    color: var(--primary);
    font-weight: 700;
}

.bd-content strong,
.bd-content b {
    color: var(--dark);
}

/* images: always fit the column, whatever width/height the editor saved */
.bd-content img {
    display: block;
    max-width: 100%;
    height: auto !important;
    margin: 1.75rem 0;
    border-radius: 6px;
}

.bd-content figure {
    margin: 1.75rem 0;
}

.bd-content figure img {
    margin: 0;
}

.bd-content figcaption {
    margin-top: .6rem;
    font-size: .875rem;
    color: #6C757D;
    text-align: center;
}

.bd-content blockquote {
    margin: 2rem 0;
    padding: 1.25rem 1.5rem;
    background: var(--secondary);
    border-left: 4px solid var(--primary);
    border-radius: 0 6px 6px 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--dark);
}

.bd-content blockquote p:last-child {
    margin-bottom: 0;
}

.bd-content hr {
    margin: 2.5rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, .1);
    opacity: 1;
}

.bd-content pre,
.bd-content code {
    font-size: .92rem;
}

.bd-content pre {
    margin: 0 0 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--dark);
    color: #F1F3F5;
    border-radius: 6px;
    overflow-x: auto;
}

.bd-content :not(pre)>code {
    padding: .15rem .4rem;
    background: var(--secondary);
    color: var(--dark);
    border-radius: 4px;
}

.bd-table-wrap {
    margin: 1.75rem 0;
    overflow-x: auto;
}

.bd-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
}

.bd-content th,
.bd-content td {
    padding: .7rem .9rem;
    border: 1px solid rgba(0, 0, 0, .1);
    vertical-align: top;
}

.bd-content th {
    background: var(--secondary);
    font-family: 'Barlow', sans-serif;
    color: var(--dark);
}

.bd-embed {
    position: relative;
    margin: 1.75rem 0;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
}

.bd-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/********** Share + back link **********/
.bd-foot {
    margin-top: 2.5rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(0, 0, 0, .08);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem 2rem;
    align-items: center;
    justify-content: space-between;
}

.bd-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
}

.bd-share-label {
    margin-right: .4rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    color: var(--dark);
}

.bd-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    background: var(--secondary);
    color: var(--dark);
    border: 0;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    transition: background .3s ease, color .3s ease, transform .3s ease;
}

.bd-share-btn:hover,
.bd-share-btn:focus-visible {
    background: var(--primary);
    color: #FFFFFF;
    transform: translateY(-3px);
}

.bd-copied {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: var(--primary);
    opacity: 0;
    transition: opacity .3s ease;
}

.bd-copied.is-visible {
    opacity: 1;
}

.bd-back {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.bd-back i {
    color: var(--primary);
    transition: transform .3s ease;
}

.bd-back:hover {
    color: var(--primary);
}

.bd-back:hover i {
    transform: translateX(-4px);
}

/********** Sidebar **********/
@media (min-width: 992px) {
    .bd-sidebar {
        position: sticky;
        top: 90px;
    }
}

.bd-card {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 6px;
    padding: 1.6rem;
    margin-bottom: 1.5rem;
}

.bd-card-title {
    margin: 0 0 1.1rem;
    padding-bottom: .8rem;
    border-bottom: 2px solid var(--primary);
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
}

.bd-rel-item {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: .85rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    text-decoration: none;
    color: inherit;
}

.bd-rel-item:last-of-type {
    border-bottom: 0;
}

.bd-rel-thumb {
    flex: 0 0 88px;
    height: 66px;
    border-radius: 4px;
    background-color: #e9ecef;
    background-size: cover;
    background-position: center;
    transition: transform .4s ease;
}

.bd-rel-item:hover .bd-rel-thumb {
    transform: scale(1.05);
}

.bd-rel-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.bd-rel-cat {
    margin-bottom: .2rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--primary);
}

.bd-rel-title {
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    color: var(--dark);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bd-rel-item:hover .bd-rel-title {
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.bd-rel-date {
    margin-top: .3rem;
    font-size: 13px;
    color: #6C757D;
}

.bd-all {
    display: inline-block;
    margin-top: .9rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.bd-all i {
    color: var(--primary);
    transition: transform .3s ease;
}

.bd-all:hover {
    color: var(--primary);
}

.bd-all:hover i {
    transform: translateX(4px);
}

/* Call to action card */
.bd-cta {
    position: relative;
    overflow: hidden;
    background: var(--dark);
    border-color: transparent;
    color: #FFFFFF;
}

.bd-cta::after {
    content: "";
    position: absolute;
    top: -10%;
    bottom: -10%;
    right: -30px;
    width: 90px;
    background: var(--primary);
    opacity: .18;
    transform: skewX(-20deg);
    pointer-events: none;
}

.bd-cta>* {
    position: relative;
    z-index: 1;
}

.bd-cta-eyebrow {
    margin-bottom: .5rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary);
}

.bd-cta-title {
    margin-bottom: .8rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    line-height: 1.25;
    color: #FFFFFF;
}

.bd-cta-text {
    margin-bottom: 1.25rem;
    font-size: .95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .75);
}

/* =====================================================================
   ANIMATIONS
   Navbar, topbar, footer and the shared button hovers live in
   layout.animations.css. Everything below is article-page only.
   Every animation uses "backwards" fill, so the normal (visible) state is
   always the default; nothing stays hidden if an animation is removed.
   ===================================================================== */

@keyframes bdWordUp {
    from {
        opacity: 0;
        transform: translateY(110%);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ---------- Hero text (the slanted bars already animate above) ---------- */
.bd-hero .breadcrumb-item {
    animation: anLeft .6s cubic-bezier(.2, .7, .2, 1) backwards;
}

.bd-hero .breadcrumb-item:nth-child(1) {
    animation-delay: .10s;
}

.bd-hero .breadcrumb-item:nth-child(2) {
    animation-delay: .20s;
}

.bd-hero .breadcrumb-item:nth-child(3) {
    animation-delay: .30s;
}

.bd-cat {
    animation: anFadeUp .6s ease .25s backwards;
}

/* words are created by blog-detail.js */
.bd-hero-title .bd-word {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
    padding-bottom: .14em;
    margin-bottom: -.14em;
}

.bd-hero-title .bd-word-in {
    display: inline-block;
    animation: bdWordUp .85s cubic-bezier(.2, .7, .2, 1) calc(.4s + var(--i, 0) * .07s) backwards;
}

.bd-hero-lead {
    animation: anFadeUp .8s ease 1s backwards;
}

.bd-hero-date {
    animation: anFadeUp .8s ease 1.15s backwards;
}

/* ---------- Content hover touches ---------- */
.bd-content img {
    transition: box-shadow .35s ease;
}

.bd-content img:hover {
    box-shadow: 0 14px 30px rgba(21, 36, 64, .15);
}

.bd-rel-item {
    transition: transform .3s ease;
}

.bd-rel-item:hover {
    transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {

    .bd-hero-bars span {
        animation: none;
    }

    .bd-share-btn,
    .bd-back i,
    .bd-all i,
    .bd-rel-item,
    .bd-rel-thumb,
    .bd-content img,
    .bd-copied {
        transition: none;
    }
}