/* ============================================
   Tag Home — Rich tag page layout
   (used by tag-travels.hbs, tag-reflections.hbs)
   ============================================ */

/* ---- Hero ---- */

.tag-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.tag-hero--has-image {
    margin-bottom: 3.5rem;
}

.tag-hero-image {
    width: calc(100% + var(--site-padding) * 2);
    margin-left: calc(var(--site-padding) * -1);
    margin-right: calc(var(--site-padding) * -1);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.tag-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tag-hero-meta {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 450;
    color: var(--color-text-muted);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.tag-hero-title {
    font-family: var(--font-headline);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 0.75rem;
}

.tag-hero-description {
    max-width: 560px;
    margin: 0 auto;
    font-size: 1.0625rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}


/* ---- Sections ---- */

.tag-home-section {
    margin-bottom: 3.5rem;
}

.tag-home-section-title {
    font-family: var(--font-headline);
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--color-text-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    margin-top: 0;
}


/* ---- Post card grid ---- */

.tag-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Dense variant: slightly smaller min for the "all posts" section */
.tag-home-grid--dense {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

/* Post card overrides within the tag-home grid */
.tag-home-grid .post-card {
    margin: 0;
    transition: transform 0.25s ease;
}

.tag-home-grid .post-card:hover {
    transform: scale(1.03);
}

.tag-home-grid .post-card-style-vertical .post-card-media {
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 3 / 2;
}

.tag-home-grid .post-card-style-vertical .post-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
}

.tag-home-grid .post-card-content h3 {
    font-size: 1.125rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}

.tag-home-grid .post-card-content h3 a {
    color: var(--color-text);
    text-decoration: none;
}

.tag-home-grid .post-card-content h3 a:hover {
    color: var(--color-terracotta);
}

.tag-home-grid .post-card-content > p {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    line-height: 1.55;
    margin-bottom: 0;
}

.tag-home-grid .post-card-meta {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* Pagination scoped to tag-home */
.tag-home .pagination {
    margin-top: 2rem;
}


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

@media (max-width: 768px) {
    .tag-hero-image {
        border-radius: 0 0 8px 8px;
    }

    .tag-home-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .tag-home-grid--dense {
        grid-template-columns: 1fr;
    }

    .tag-home-section-title {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tag-home-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
