/*
 * Hyvä Yoga /blog listing — main column (no WP sidebar).
 * Accent follows Hyvä --color-primary (merchant theme may recolour).
 */

.hyva-yoga-blog {
    --hyva-yoga-accent: var(--color-primary);
    --hyva-yoga-ink: #1a1a1a;
    --hyva-yoga-muted: #666;
    --hyva-yoga-border: rgba(0, 0, 0, 0.1);
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 1rem 1rem 3rem;
    color: var(--hyva-yoga-ink);
}

.hyva-yoga-blog--with-nav {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

/* Post detail: always reserve right column (related products / empty state) */
.hyva-yoga-blog--post.hyva-yoga-blog--with-nav.hyva-yoga-blog--with-related {
    grid-template-columns: minmax(140px, 200px) minmax(0, 1fr) minmax(180px, 240px);
}

.hyva-yoga-blog__main {
    min-width: 0;
}

.hyva-yoga-blog__right {
    min-width: 0;
}

/* Mid: keep left nav; related products drop under main content */
@media (max-width: 900px) {
    .hyva-yoga-blog--post.hyva-yoga-blog--with-nav.hyva-yoga-blog--with-related {
        grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
    }

    .hyva-yoga-blog--post .hyva-yoga-blog__right {
        grid-column: 2;
    }
}

@media (max-width: 767px) {
    .hyva-yoga-blog--with-nav {
        grid-template-columns: 1fr;
    }

    .hyva-yoga-blog--post.hyva-yoga-blog--with-nav.hyva-yoga-blog--with-related {
        grid-template-columns: 1fr;
    }

    .hyva-yoga-blog--post .hyva-yoga-blog__right {
        grid-column: 1;
    }
}

.hyva-yoga-blog__categories {
    margin-bottom: 1.5rem;
}

.hyva-yoga-blog__categories-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hyva-yoga-muted);
    margin-bottom: 0.65rem;
}

.hyva-yoga-blog__category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
}

.hyva-yoga-blog__category {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--hyva-yoga-border);
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.85rem;
    color: var(--hyva-yoga-ink);
}

.hyva-yoga-blog__category:hover,
.hyva-yoga-blog__category.is-active {
    background: var(--hyva-yoga-accent);
    border-color: var(--hyva-yoga-accent);
    color: var(--color-on-primary, #fff);
    text-decoration: none;
}

.hyva-yoga-blog__search {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--hyva-yoga-border);
}

/* Left column: keep search compact above band nav / widgets */
.hyva-yoga-blog__left-nav .hyva-yoga-blog__search {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
}

.hyva-yoga-blog__left-nav .hyva-yoga-blog__search-row {
    max-width: none;
    flex-direction: column;
}

.hyva-yoga-blog__search-label {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.hyva-yoga-blog__search-row {
    display: flex;
    gap: 0.5rem;
    max-width: 28rem;
}

.hyva-yoga-blog__search-input {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--hyva-yoga-border);
    border-radius: 0.25rem;
}

.hyva-yoga-blog__search-btn {
    padding: 0.55rem 1rem;
    background: var(--hyva-yoga-accent);
    color: var(--color-on-primary, #fff);
    border: 0;
    border-radius: 0.25rem;
    font-weight: 600;
    cursor: pointer;
}

.hyva-yoga-blog__search-btn:hover {
    filter: brightness(1.05);
}

.hyva-yoga-blog__cards {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.hyva-yoga-blog-card {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.hyva-yoga-blog-card__media {
    position: relative;
    display: block;
    border-radius: 0.25rem;
    overflow: hidden;
    background: #eee;
}

.hyva-yoga-blog-card__media img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
}

/* Option C: natural image height when admin sets Fixed listing image height = No */
.hyva-yoga-blog[data-listing-media="natural"] .hyva-yoga-blog-card__media img {
    aspect-ratio: auto;
    height: auto;
    object-fit: unset;
    max-height: 36rem;
}

.hyva-yoga-blog-card__date {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: color-mix(in srgb, var(--hyva-yoga-accent) 95%, transparent);
    color: var(--color-on-primary, #fff);
    text-align: center;
    padding: 0.35rem 0.5rem;
    min-width: 3.25rem;
    line-height: 1.15;
}

.hyva-yoga-blog-card__day {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
}

.hyva-yoga-blog-card__month {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.hyva-yoga-blog-card__title {
    margin: 0 0 0.5rem;
    font-size: 1.35rem;
    line-height: 1.25;
}

.hyva-yoga-blog-card__title a {
    color: inherit;
    text-decoration: none;
}

.hyva-yoga-blog-card__title a:hover {
    color: var(--hyva-yoga-accent);
}

.hyva-yoga-blog-card__tags {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--hyva-yoga-muted);
}

.hyva-yoga-blog-card__tags a {
    color: var(--hyva-yoga-accent);
    text-decoration: none;
}

.hyva-yoga-blog-card__tags a:hover {
    text-decoration: underline;
}

.hyva-yoga-blog-card__excerpt {
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--hyva-yoga-muted);
}

.hyva-yoga-blog-card__cta a {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--hyva-yoga-accent);
    text-decoration: none;
}

.hyva-yoga-blog-card__cta a:hover {
    text-decoration: underline;
}

.hyva-yoga-blog__pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--hyva-yoga-border);
}

.hyva-yoga-blog__pagination a {
    color: var(--hyva-yoga-accent);
    text-decoration: none;
}

.hyva-yoga-blog__pagination-current {
    font-weight: 700;
}

.hyva-yoga-blog__empty {
    color: var(--hyva-yoga-muted);
}

@media (max-width: 720px) {
    .hyva-yoga-blog-card {
        grid-template-columns: 1fr;
    }

    .hyva-yoga-blog__search-row {
        flex-direction: column;
        max-width: none;
    }
}
