/* =====================================================================
   ANEKOR – blogs.css  (Blog page styles)
   Page styles + page animations (see the "ANIMATIONS" section near the end).
   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/blogs.css" rel="stylesheet">
   ===================================================================== */

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

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

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

.blog-hero .breadcrumb {
    margin-bottom: 1.75rem;
    font-family: 'Barlow', sans-serif;
    font-weight: 500;
    font-size: 15px;
}

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

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

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

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

.blog-hero-title {
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    font-size: clamp(2.4rem, 5.2vw, 4.25rem);
    line-height: 1.08;
    letter-spacing: -.01em;
    color: #FFFFFF;
    max-width: 17em;
    margin-bottom: 1.5rem;
}

.blog-hero-lead {
    max-width: 34em;
    font-size: 1.125rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
    margin-bottom: 0;
}

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

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

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

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

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

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

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

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

    .blog-hero-bars {
        width: 70%;
        opacity: .55;
    }

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

/********** Blog Listing **********/
.blog-listing {
    background: var(--secondary);
}

.post-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--light);
    border: 1px solid rgba(0, 0, 0, .06);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow .3s;
}

.post-card:hover {
    box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .08);
}

/* Image placeholder. To use a real image later, replace the
   .post-thumb contents with:
   <img src="img/blog-1.jpg" alt="" class="w-100 h-100" style="object-fit:cover;"> */
.post-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--t-bg);
}

.post-thumb::before,
.post-thumb::after {
    content: "";
    position: absolute;
    top: -10%;
    bottom: -10%;
    transform: skewX(-20deg);
}

.post-thumb::before {
    right: 12%;
    width: 22%;
    background: var(--t-bar1);
}

.post-thumb::after {
    right: 38%;
    width: 7%;
    background: var(--t-bar2);
}

.post-thumb>i {
    position: absolute;
    top: 1.5rem;
    left: 1.75rem;
    z-index: 1;
    font-size: 2.25rem;
    color: var(--t-icon);
}

.post-tag {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    z-index: 1;
    background: #FFFFFF;
    color: var(--dark);
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    padding: .4rem .8rem;
    border-radius: 30px;
}

.thumb-navy {
    --t-bg: #152440;
    --t-bar1: #1B9E93;
    --t-bar2: rgba(255, 255, 255, .10);
    --t-icon: #FFFFFF;
}

.thumb-teal {
    --t-bg: #1B9E93;
    --t-bar1: #152440;
    --t-bar2: rgba(255, 255, 255, .20);
    --t-icon: #FFFFFF;
}

.thumb-mist {
    --t-bg: #DDEFEC;
    --t-bar1: #1B9E93;
    --t-bar2: rgba(21, 36, 64, .08);
    --t-icon: #152440;
}

.thumb-slate {
    --t-bg: #26395C;
    --t-bar1: rgba(27, 158, 147, .85);
    --t-bar2: rgba(255, 255, 255, .08);
    --t-icon: #FFFFFF;
}

/* Real uploaded image inside the thumbnail */
.post-thumb.has-img {
    background: #e9ecef;
}

/* hide the decorative slanted bars, they would sit on top of the photo */
.post-thumb.has-img::before,
.post-thumb.has-img::after {
    display: none;
}

.post-thumb-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.post-card:hover .post-thumb-img {
    transform: scale(1.06);
}

.post-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 1.5rem 1.75rem 1.75rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 1rem;
    font-family: 'Barlow', sans-serif;
    font-size: 13px;
    color: #6C757D;
    margin-bottom: .6rem;
}

.post-title {
    font-family: 'Barlow', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.35;
    margin-bottom: .75rem;
}

.post-title a {
    color: var(--dark);
    text-decoration: none;
}

.post-card:hover .post-title a {
    text-decoration: underline;
    text-decoration-color: var(--primary);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

/* Keyboard focus ring drawn around the whole card */
.post-title a:focus {
    outline: none;
}

.post-title a:focus-visible::after {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: 6px;
}

.post-excerpt {
    font-size: .95rem;
    line-height: 1.7;
    color: #6C757D;
    margin-bottom: 1.5rem;
}

.post-more {
    margin-top: auto;
    font-family: 'Barlow', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

.post-more i {
    color: var(--primary);
    transition: transform .3s;
}

.post-card:hover .post-more i {
    transform: translateX(4px);
}

/* New cards fade in after "View More" */
.post-col.is-new {
    animation: cardIn .45s ease-out both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-status {
    font-family: 'Barlow', sans-serif;
    font-size: 14px;
    color: #6C757D;
    margin: 1rem 0 0;
}

/* =====================================================================
   ANIMATIONS
   Navbar, topbar, footer and the shared button hovers live in
   layout.animations.css. Everything below is blog-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 anWordUp {
    from {
        opacity: 0;
        transform: translateY(110%);
    }

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

@keyframes anIconPop {
    0% {
        opacity: 0;
        transform: scale(0) rotate(-45deg);
    }

    60% {
        opacity: 1;
        transform: scale(1.25) rotate(8deg);
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes statusIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

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

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

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

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

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

.blog-hero-title .word-in {
    display: inline-block;
    animation: anWordUp .85s cubic-bezier(.2, .7, .2, 1) calc(.3s + var(--i, 0) * .09s) backwards;
}

.blog-hero-lead {
    animation: anFadeUp .8s ease .95s backwards;
}

/* ---------- Article cards ---------- */
.post-card {
    transition: box-shadow .35s ease, transform .35s ease, border-color .35s ease;
}

.post-card:hover {
    transform: translateY(-8px);
    border-color: rgba(27, 158, 147, .35);
    box-shadow: 0 18px 38px rgba(21, 36, 64, .14);
}

/* the slanted bars in the thumbnail slide, the icon tilts, the tag lifts */
.post-thumb::before,
.post-thumb::after {
    transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}

.post-card:hover .post-thumb::before {
    transform: translateX(-16px) skewX(-20deg);
}

.post-card:hover .post-thumb::after {
    transform: translateX(-8px) skewX(-20deg);
}

.post-thumb>i {
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}

.post-card:hover .post-thumb>i {
    transform: scale(1.18) rotate(-8deg);
}

.post-tag {
    transition: transform .35s ease, box-shadow .35s ease;
}

.post-card:hover .post-tag {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(21, 36, 64, .18);
}

.post-more {
    transition: color .3s ease;
}

.post-card:hover .post-more {
    color: var(--primary);
}

/* icon pops and tag slides in when the card appears.
   .aos-animate = first 6 cards (scroll reveal), .is-new = cards added by "View More" */
.aos-animate .post-thumb>i,
.post-col.is-new .post-thumb>i {
    animation: anIconPop .8s cubic-bezier(.2, .7, .2, 1) .3s backwards;
}

.aos-animate .post-tag,
.post-col.is-new .post-tag {
    animation: anLeft .6s cubic-bezier(.2, .7, .2, 1) .5s backwards;
}

/* ---------- "View More" button + status line ---------- */
.btn .fa-arrow-down {
    transition: transform .3s ease;
}

.btn:hover .fa-arrow-down {
    transform: translateY(4px);
}

.blog-status.is-updated {
    animation: statusIn .5s ease backwards;
}

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

    .blog-hero-bars span,
    .post-col.is-new {
        animation: none;
    }

    .post-more i,
    .post-card {
        transition: none;
    }
}