/*
  Views/Blog/Index.cshtml styles.
  Loads after site-theme.css and reuses its REV Solar tokens
  (--rev-marigold, --rev-indigo, --rev-slate, --rev-limestone, --rev-leaf).
  Card visual language mirrors home.css's .home-blog-card block (this page is
  the full listing that block teases into).
*/

.blog-index-header {
    background: var(--rev-indigo);
    color: #fff;
    padding: 56px 0 40px;
}

.blog-index-header h1 {
    font-size: clamp(1.7rem, 3.5vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    max-width: 26ch;
    margin-bottom: .75rem;
}

.blog-index-header p {
    font-size: 1.05rem;
    color: #e8edf0;
    max-width: 60ch;
    margin: 0;
}

.blog-index-list {
    background: #fff;
    padding: 3rem 0 4rem;
}

.blog-index-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 576px) {
    .blog-index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .blog-index-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Elevated card container: white, rounded, hairline border, soft ambient
   shadow that deepens on hover — consistent with the homepage card look. The
   photo sits flush at the top; the text is padded in. */
.blog-index-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--rev-border);
    border-radius: var(--rev-radius);
    overflow: hidden;
    box-shadow: var(--rev-shadow);
    transition: transform .15s ease, box-shadow .2s ease;
}

.blog-index-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--rev-shadow-lg);
}

.blog-index-card__photo {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 1rem;
}

.blog-index-card__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}

.blog-index-card:hover .blog-index-card__photo img {
    transform: scale(1.04);
}

.blog-index-card__meta {
    font-size: .8rem;
    color: var(--rev-slate);
    margin-bottom: .4rem;
    padding: 0 1.25rem;
}

.blog-index-card__title {
    font-size: 1.1rem;
    margin-bottom: .5rem;
    padding: 0 1.25rem;
}

.blog-index-card__desc {
    font-size: .92rem;
    color: var(--rev-slate);
    margin-bottom: 1rem;
    padding: 0 1.25rem;
}

/* trailing "Read more" button sits inside the card padding, pinned to the base */
.blog-index-card > .btn {
    margin: auto 1.25rem 1.25rem;
    align-self: flex-start;
}

@media (prefers-reduced-motion: reduce) {
    .blog-index-card { transition: box-shadow .2s ease; }
    .blog-index-card:hover { transform: none; }
    .blog-index-card__photo img,
    .blog-index-card:hover .blog-index-card__photo img { transition: none; transform: none; }
}
