/* =========================================================
   Blog & News Index – Modern Layout
   ========================================================= */
:root {
    --cch-brand: #0056b3;
    --cch-ink: #1a2b49;
    --cch-ink-2: #304562;
    --cch-muted: #55607a;
    --cch-bg: #ffffff;
    --cch-soft: #f3f7ff;
    --cch-soft-2: #e6f2ff;
    --cch-accent: #01eefc;
    /* NEW */
    --gap: 14px;
}


.cch-blog-wrap {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 18px 12px;
    color: var(--cch-ink);
    font-family: Inter, system-ui, Arial, sans-serif
}

/* Hero */
.cch-blog-hero {
    margin: 6px 0 10px;
    text-align: left;
    /* left-aligned */
}

.cch-hero-eyebrow {
    font-weight: 800;
    color: var(--cch-brand);
    opacity: .95;
    letter-spacing: .01em;
    font-size: .95rem
}

.cch-hero-title {
    margin: 2px 0 6px;
    font-weight: 800;
    color: var(--cch-brand);
    letter-spacing: -.015em;
    line-height: 1.2;
    font-size: clamp(1.02rem, 1.6vw, 1.15rem);
    /* smaller, H3-ish */
}

/* Pill wrapper for the page title */
.cch-hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--cch-soft-2);
    border: 1px solid #d5e6ff;
    color: var(--cch-ink);
    /* complimentary to background */
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(0, 86, 179, .08);
}


/* Force title text to dark brand inside the pill */
.cch-hero-title.cch-hero-pill {
    color: var(--cch-brand);
    /* #0056b3 */
}


.cch-hero-tagline {
    margin: 0;
    color: var(--cch-muted);
    font-size: 1.02rem
}

/* Recent slider */
.cch-recent {
    position: relative;
    background: linear-gradient(145deg, #ffffff, #f6faff);
    border: 1px solid #d5e6ff;
    box-shadow: 0 8px 24px rgba(0, 86, 179, .10);
    border-radius: 14px;
    padding: 10px;
    overflow: hidden;
    margin: 14px 0
}

.cch-recent-track {
    display: flex;
    transition: transform .35s ease
}

.cch-recent-slide {
    min-width: 100%;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    align-items: stretch;
    padding: 10px 6px 14px;
}


@media (max-width:860px) {
    .cch-recent-slide {
        grid-template-columns: 1fr
    }
}

.cch-recent-media {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f8ff
}

.cch-recent-media img {
    display: block;
    width: 100%;
    height: clamp(240px, 40vw, 440px);
    object-fit: cover;
    object-position: center 18%;
}


.cch-recent-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-self: center
}

.cch-recent-title {
    margin: 0;
    font-size: 1.15rem
}

.cch-recent-title a {
    color: var(--cch-ink);
    text-decoration: underline;
    text-underline-offset: 3px
}

.cch-recent-excerpt {
    margin: 0;
    color: #4b5c7a;
    line-height: 1.5
}

.cch-recent-meta {
    display: inline-flex;
    gap: 8px;
    color: #5a6b8c;
    font-size: .92rem
}

.cch-dot {
    opacity: .6
}

.cch-indicators {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 8px 0 2px;
}

.cch-indicator {
    position: relative;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 1px solid var(--cch-brand);
    background: var(--cch-brand);
    /* starts blue */
    padding: 0;
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 86, 179, .25);
}

.cch-indicator .cch-indicator-fill {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    /* Complementary progress over the blue base */
    background: conic-gradient(var(--cch-accent) var(--p, 0%), rgba(255, 255, 255, .45) 0);
    -webkit-mask: radial-gradient(circle 5px, transparent 65%, #000 66%);
    mask: radial-gradient(circle 5px, transparent 65%, #000 66%);
    transition: background .2s linear;
}

.cch-indicator.is-active {
    box-shadow: 0 3px 12px rgba(0, 86, 179, .35);
}


.cch-readmore {
    align-self: flex-start;
    border: 2px solid var(--cch-brand);
    color: var(--cch-brand);
    text-decoration: none;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    transition: background .2s ease, color .2s ease
}

.cch-readmore:hover {
    background: var(--cch-brand);
    color: #fff
}

.cch-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: #fff;
    border: 1px solid #d5e6ff;
    border-radius: 999px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    cursor: pointer
}

.cch-prev {
    left: 8px
}

.cch-next {
    right: 8px
}

.cch-nav:disabled {
    opacity: .45;
    pointer-events: none
}

/* Search */
.cch-search {
    margin: 14px 0 18px;
}

.cch-search-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cch-search .input-wrapper {
    max-width: none;
    flex: 1 1 auto;
    position: relative;
}

.cch-search .search-box {
    width: 100%;
    border: 1px solid #e5e7eb;
    /* neutral border (matches homepage) */
    border-radius: 999px;
    /* pill */
    padding: 16px 18px;
    background: #ffffff;
    /* solid white */
    color: #0f172a;
    font-size: 1.05rem;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, .04),
        0 8px 20px rgba(0, 0, 0, .06);
    transition: box-shadow .2s ease, border-color .2s ease;
}

.cch-search .search-box::placeholder {
    color: #64748b;
    opacity: .9;
}

.cch-search .search-box:focus {
    outline: none;
    border-color: #60a5fa;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .15),
        0 8px 22px rgba(0, 0, 0, .08);
}

/* Gradient pill button (identical behavior to homepage) */
.cch-search .search-btn {
    border: none;
    border-radius: 999px;
    padding: 14px 22px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    background: radial-gradient(120% 160% at 0% 0%, #1a66cc 0%, #0056b3 42%, #004a9b 100%);
    color: #fff;
    font-weight: 800;
    letter-spacing: .02em;
    box-shadow:
        0 10px 24px rgba(0, 86, 179, .22),
        inset 0 1px 0 rgba(255, 255, 255, .22);
    cursor: pointer;
    transition: transform .12s ease, box-shadow .25s ease, filter .25s ease;
}

.cch-search .search-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.05);
    box-shadow:
        0 14px 28px rgba(0, 86, 179, .28),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.cch-search .search-btn:active {
    transform: translateY(1px);
    box-shadow:
        0 6px 18px rgba(0, 86, 179, .22),
        inset 0 0 0 rgba(255, 255, 255, 0);
}

.cch-search .search-btn:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .30),
        0 12px 28px rgba(0, 86, 179, .30),
        inset 0 1px 0 rgba(255, 255, 255, .28);
}

.cch-search .btn-main {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

/* Mobile stack */
@media (max-width: 720px) {
    .cch-search-row {
        flex-direction: column;
        gap: 12px;
    }

    .cch-search .search-btn {
        width: 100%;
    }
}


/* Popular */
.cch-popular {
    margin: 8px 0 12px
}

.cch-section-title {
    margin: 0;
    color: var(--cch-brand);
    font-weight: 800;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 8px;
    /* room for underline */
}

.cch-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    /* sits just below text */
    width: 66px;
    height: 3px;
    background: linear-gradient(90deg, var(--cch-brand), var(--cch-accent));
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 86, 179, .15);
}


.cch-popular-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 16px
}

@media (max-width:900px) {
    .cch-popular-grid {
        grid-template-columns: 1fr
    }
}

.cch-popular-card {
    display: block;
    text-decoration: none;
    color: inherit
}

.cch-popular-card--main {
    background: #fff;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 86, 179, .12)
}

.cch-popular-media {
    position: relative;
    background: #f5f8ff
}

.cch-popular-media img {
    display: block;
    width: 100%;
    height: clamp(180px, 34vw, 340px);
    object-fit: cover;
    object-position: center 18%
}

.cch-pop-badges {
    position: absolute;
    left: 10px;
    bottom: 10px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap
}

.cch-badge {
    background: rgba(0, 0, 0, .65);
    color: #fff;
    padding: 6px 8px;
    border-radius: 999px;
    font-size: .85rem
}

.cch-popular-title {
    margin: 10px 12px 12px;
    font-size: 1.1rem;
    text-decoration: underline;
    text-underline-offset: 3px
}

.cch-popular-side {
    display: grid;
    gap: 10px
}

.cch-side-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    border: 1px solid #e6ecf5;
    border-radius: 10px;
    background: #fff;
    text-decoration: none;
    color: inherit;
    padding: 8px
}

.cch-side-thumb img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 8px;
}


.cch-side-title {
    margin: 2px 0 4px;
    font-size: 1rem
}

.cch-side-stats {
    color: #5a6b8c;
    font-size: .92rem;
    display: inline-flex;
    gap: 8px
}

/* Chips */
.cch-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--cch-soft-2);
    color: var(--cch-brand);
    font-weight: 700;
    font-size: .82rem
}

.cch-chip--ghost {
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(140%) blur(3px);
    border: 1px solid rgba(213, 230, 255, .8)
}

.cch-chip--primary {
    background: #e8f1ff
}

/* Sections (horizontal carousel) */
.cch-section {
    margin: 20px 0;
}


.cch-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* center aligns with underline nicely */
    gap: 10px;
    margin: 0 0 14px;
    /* breathing room before cards */
}

@media (max-width: 560px) {
    .cch-section-head {
        flex-wrap: wrap;
        gap: 6px 10px;
        margin-bottom: 12px;
    }
}


/* Space under the single-line Popular heading */
.cch-popular > .cch-section-title { margin-bottom: 14px; }


.cch-see-more {
    text-decoration: none;
    font-weight: 700;
    color: var(--cch-brand);
    border: 2px solid var(--cch-brand);
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    transition: background .2s ease, color .2s ease;
}

.cch-see-more:hover {
    background: var(--cch-brand);
    color: #fff;
}

.cch-row {
    position: relative
}

.cch-row-track {
    --gap: 14px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (3*var(--gap))) / 4);
    gap: var(--gap);
    transition: transform .35s ease;
    will-change: transform
}

@media (max-width:1100px) {
    .cch-row-track {
        grid-auto-columns: calc((100% - (2*var(--gap))) / 3)
    }
}

@media (max-width:820px) {
    .cch-row-track {
        grid-auto-columns: calc((100% - (1*var(--gap))) / 2)
    }
}

@media (max-width:560px) {
    .cch-row-track {
        grid-auto-columns: 100%
    }
}

.cch-row-nav {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: radial-gradient(120% 160% at 0% 0%, #1a66cc 0%, #0056b3 42%, #004a9b 100%);
    color: #fff;
    /* arrow character is now white */
    box-shadow: 0 12px 28px rgba(0, 86, 179, .26), inset 0 1px 0 rgba(255, 255, 255, .25);
    cursor: pointer;
}

.cch-row-nav:hover {
    transform: translateY(calc(-50% - 1px));
    filter: brightness(1.06);
}

.cch-row-nav:disabled {
    opacity: .45;
    pointer-events: none;
}

@media (max-width: 560px) {
    .cch-row-nav {
        width: 38px;
        height: 38px;
    }
}

.cch-row-track.grabbing {
    cursor: grabbing;
}

.cch-row-prev {
    left: -6px
}

.cch-row-next {
    right: -6px
}

.cch-row-nav:disabled {
    opacity: .45;
    pointer-events: none
}

/* Card */
.cch-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid #e6ecf5;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 8px 18px rgba(15, 27, 58, .06)
}

.cch-card-media {
    position: relative;
    background: #f5f8ff
}

.cch-card-media img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
    object-position: center 20%
}

.cch-card-body {
    padding: 12px
}

.cch-card-title {
    margin: 0 0 6px;
    font-size: 1rem;
    text-decoration: underline;
    text-underline-offset: 3px
}

.cch-card-meta {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    /* small gap helps keep one line */
    color: #5a6b8c;
    font-size: .88rem;
    /* slightly smaller for tighter cards */
    white-space: nowrap;
    /* force single line */
    overflow: hidden;
    /* avoid spill on narrow screens */
    text-overflow: ellipsis;
}


/* Fallbacks/empties */
.cch-media-fallback {
    display: grid;
    place-items: center;
    height: 100%;
    min-height: 140px;
    background: #eef4ff;
    color: #7a8cab;
    border-radius: 12px
}

.cch-empty {
    color: #7a8cab
}

.cch-popular-card--main {
    display: block;
}

.cch-popular-body {
    padding: 12px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cch-popular-meta {
    color: #5a6b8c;
    font-size: .92rem;
    display: inline-flex;
    gap: 8px;
}

/* Reserve real gutter for arrows so cards never sit beneath them */
.cch-row {
    padding: 0 44px;
    /* 44px = 34px button + 10px breathing room */
    overflow: hidden;
    /* clip any slide creep on fast clicks */
}

/* Keep arrows always above cards */
.cch-row-nav {
    z-index: 3;
}

.cch-row-prev {
    left: 8px;
}

.cch-row-next {
    right: 8px;
}

/* ===== Stacking fixes so Blog/News never cover the global header ===== */
.cch-blog-wrap,
.cch-blog-hero {
    position: relative;
    z-index: 1;
    /* keep page content in a low layer under header/dropdowns */
}

/* Defensive: any top-of-page containers with overflow won't clip header menus */
.cch-recent,
.cch-popular,
.cch-section {
    position: relative;
    z-index: 1;
}