/* CA Post Detail - Header / Title / Breadcrumb / Article Info / Previous-Next only */

/* Base wrappers used by the retained post header/navigation */
.ca-post-detail {
    background: #fff;
    color: #222328;
}

.ca-post-detail__container {
    width: 100%;
    margin: 0 auto;
}

.ca-post-detail__title {
    margin: 0;
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

/* =========================================================
   Article title / header
   ========================================================= */
.ca-post-title-area {
    padding: 52px 0 38px;
    background: #fff;
}

.ca-post-title-area .ca-post-detail__title {
    max-width: 980px;
}

/* =========================================================
   Breadcrumb + article information / share bar
   ========================================================= */
.ca-article-info {
    position: relative;
    z-index: 3;
    padding: 0;
    background: #f7f7f9;
    border-top: 1px solid #efeff2;
    border-bottom: 1px solid #e7e7eb;
}

.ca-article-info__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 36px;
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 126px;
    padding: 22px 0;
}

.ca-article-info__main {
    min-width: 0;
}

.ca-post-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0 0 18px;
    color: #85858e;
    font-size: 13px;
    line-height: 1.45;
}

.ca-post-breadcrumbs a {
    color: #45454d;
    font-weight: 600;
    text-decoration: none;
    transition: color .2s ease;
}

.ca-post-breadcrumbs a:hover {
    color: #b21e68;
}

.ca-post-breadcrumbs__separator {
    color: #babac1;
}

.ca-post-breadcrumbs__current {
    max-width: 390px;
    overflow: hidden;
    color: #878790;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-article-info__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

.ca-article-info__author {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.ca-article-info__avatar {
    width: 34px;
    height: 34px;
    overflow: hidden;
    flex: 0 0 34px;
    border-radius: 50%;
    background: #e8e8ec;
}

.ca-article-info__avatar img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ca-article-info__author > span:last-child,
.ca-article-info__detail {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.ca-article-info__meta small,
.ca-article-share__label small {
    color: #9b9ba4;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .07em;
    line-height: 1.2;
    text-transform: uppercase;
}

.ca-article-info__meta strong,
.ca-article-info__detail time {
    color: #34343b;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

a.ca-article-info__detail {
    text-decoration: none;
}

.ca-article-info__divider {
    width: 1px;
    height: 30px;
    background: #dedee3;
}

.ca-article-share {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 13px 16px 13px 19px;
    border: 1px solid #dedee4;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 22px rgba(30, 30, 38, .05);
}

.ca-article-share__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-right: 3px;
}

.ca-article-share__label strong {
    color: #34343b;
    font-size: 14px;
}

.ca-article-share__buttons {
    display: flex;
    align-items: center;
    gap: 7px;
}

.ca-article-share__buttons a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid #e0e0e5;
    border-radius: 50%;
    background: #fafafa;
    color: #33333a;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ca-article-share__buttons a:hover {
    transform: translateY(-2px);
    border-color: #b21e68;
    background: #b21e68;
    color: #fff;
}

.ca-post-detail--header-hidden .ca-article-info {
    border-top: 0;
}

/* Legacy top strip should stay hidden when this newer header is used. */
.ca-post-detail__top {
    display: none !important;
}

/* =========================================================
   Previous / Next article navigation
   ========================================================= */
.ca-post-navigation {
    padding: 34px 0 72px;
    background: #f7f7f9;
    border-top: 1px solid #ededf1;
}

.ca-post-navigation .ca-post-detail__container {
    width: min(1240px, calc(100% - 48px));
    margin: 0 auto;
}

.ca-post-navigation__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.ca-post-navigation__grid--single {
    grid-template-columns: minmax(0, 1fr);
    max-width: 610px;
}

.ca-post-nav-card {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    min-height: 170px;
    overflow: hidden;
    border: 1px solid #e5e5ea;
    border-radius: 16px;
    background: #fff;
    color: #292930;
    text-decoration: none;
    box-shadow: 0 8px 28px rgba(28, 28, 36, .045);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ca-post-nav-card:hover {
    transform: translateY(-3px);
    border-color: #d7d7dd;
    box-shadow: 0 16px 36px rgba(28, 28, 36, .09);
}

.ca-post-nav-card__image {
    min-height: 170px;
    overflow: hidden;
    background: #ececf0;
}

.ca-post-nav-card__image img,
.ca-post-nav-card__placeholder {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 170px;
    object-fit: cover;
    transition: transform .35s ease;
}

.ca-post-nav-card:hover .ca-post-nav-card__image img {
    transform: scale(1.04);
}

.ca-post-nav-card__content {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 22px 24px;
}

.ca-post-nav-card__direction {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #7e7e87;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.ca-post-nav-card__direction span {
    color: #b21e68;
    font-size: 17px;
    line-height: 1;
}

.ca-post-nav-card__category {
    display: block;
    margin-bottom: 6px;
    color: #b21e68;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.ca-post-nav-card h3 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 10px;
    color: #24242b;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.28;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ca-post-nav-card time {
    color: #96969f;
    font-size: 12px;
}

.ca-post-nav-card--next .ca-post-nav-card__direction {
    justify-content: flex-start;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 960px) {
    .ca-post-navigation__grid {
        grid-template-columns: 1fr;
    }

    .ca-post-navigation__grid--single {
        max-width: none;
    }
}

@media (max-width: 900px) {
    .ca-article-info__card {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px 0;
    }

    .ca-article-share {
        width: fit-content;
    }
}

@media (max-width: 600px) {
    .ca-post-title-area {
        padding: 34px 0 26px;
    }

    .ca-post-detail__title {
        font-size: 38px;
    }

    .ca-article-info__card {
        min-height: 0;
        padding: 18px 0;
    }

    .ca-post-breadcrumbs {
        margin-bottom: 14px;
        font-size: 12px;
    }

    .ca-post-breadcrumbs__current {
        max-width: 220px;
    }

    .ca-article-info__meta {
        gap: 12px;
    }

    .ca-article-info__divider {
        display: none;
    }

    .ca-article-share {
        width: 100%;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .ca-post-navigation {
        padding: 26px 0 48px;
    }

    .ca-post-nav-card {
        grid-template-columns: 115px minmax(0, 1fr);
        min-height: 145px;
        border-radius: 13px;
    }

    .ca-post-nav-card__image,
    .ca-post-nav-card__image img,
    .ca-post-nav-card__placeholder {
        min-height: 145px;
    }

    .ca-post-nav-card__content {
        padding: 17px;
    }

    .ca-post-nav-card h3 {
        font-size: 17px;
    }

    .ca-post-nav-card__direction {
        margin-bottom: 9px;
        font-size: 10px;
    }
}
