/* =========================================================
   Blog Cards component
   Path suggestion: global/components/blog_cards.css
   Site ka font inherit hota hai; accent colour theme ke
   --primary-color se aata hai (na mile to teal fallback).
   ========================================================= */

.blog-cards {
    --bc-accent: var(--primary-color, #0e6b5c);
    --bc-ink: #1d2a2e;
    --bc-muted: #5b6a6f;
    --bc-line: #e3e8e6;
    --bc-gap: 20px;

    padding: 56px 0;
}

.blog-cards__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */

.blog-cards__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.blog-cards__title {
    margin: 0 0 6px;
    font-size: clamp(1.5rem, 2.6vw, 2.1rem);
    line-height: 1.2;
    color: var(--bc-ink);
}

.blog-cards__sub {
    margin: 0;
    max-width: 60ch;
    color: var(--bc-muted);
    line-height: 1.55;
}

.blog-cards__nav {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.blog-cards__arrow {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--bc-line);
    background: #fff;
    color: var(--bc-ink);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.blog-cards__arrow:hover:not(:disabled) {
    background: var(--bc-accent);
    border-color: var(--bc-accent);
    color: #fff;
}

.blog-cards__arrow:disabled {
    opacity: .4;
    cursor: default;
}

/* Saare cards screen me aa jayein to arrows ki zarurat nahi */
.blog-cards.is-static .blog-cards__nav {
    display: none;
}

/* ---------- Track ---------- */

.blog-cards__track {
    display: flex;
    gap: var(--bc-gap);
    overflow-x: auto;
    padding: 4px 2px 16px;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.blog-cards__track::-webkit-scrollbar {
    display: none;
}

/* ---------- Card ---------- */

.bc-card {
    position: relative;
    flex: 0 0 min(320px, 82%);
    display: flex;
    flex-direction: column;
    scroll-snap-align: start;
    background: #fff;
    border: 1px solid var(--bc-line);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s;
}

.bc-card:hover {
    border-color: var(--bc-accent);
    box-shadow: 0 10px 28px rgba(29, 42, 46, .10);
}

.bc-card__media {
    position: relative;
    aspect-ratio: 8 / 5;
    background: #eef3f1;
}

.bc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bc-card__ph {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #d8ebe6, #f1f5f3);
}

.bc-card__tag {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .94);
    color: var(--bc-ink);
    font-size: .78rem;
    font-weight: 600;
}

.bc-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.bc-card__place {
    margin: 0 0 6px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--bc-accent);
}

.bc-card__title {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.35;
}

/* Poora card clickable, but real link sirf title par */
.bc-card__link {
    color: var(--bc-ink);
    text-decoration: none;
}

.bc-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
}

.bc-card__excerpt {
    margin: 0;
    font-size: .93rem;
    line-height: 1.55;
    color: var(--bc-muted);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bc-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin: auto 0 0;
    padding-top: 14px;
    font-size: .82rem;
    color: var(--bc-muted);
}

/* ---------- Footer button ---------- */

.blog-cards__foot {
    margin-top: 8px;
    text-align: center;
}

.blog-cards__all {
    display: inline-block;
    padding: 11px 24px;
    border: 1.5px solid var(--bc-accent);
    border-radius: 999px;
    color: var(--bc-accent);
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}

.blog-cards__all:hover {
    background: var(--bc-accent);
    color: #fff;
}

/* ---------- Focus ---------- */

.blog-cards__arrow:focus-visible,
.blog-cards__track:focus-visible,
.bc-card__link:focus-visible,
.blog-cards__all:focus-visible {
    outline: 2px solid var(--bc-accent);
    outline-offset: 3px;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {

    .blog-cards {
        padding: 40px 0;
    }

    .blog-cards__head {
        flex-direction: column;
        align-items: flex-start;
    }

    /* mobile par swipe hi natural hai */
    .blog-cards__nav {
        display: none;
    }
}

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

    .blog-cards__track {
        scroll-behavior: auto;
    }

    .bc-card,
    .blog-cards__arrow,
    .blog-cards__all {
        transition: none;
    }
}