/* Scoped to .blog-* / .blog-page-body — standalone page, no dependency on
   the main site's layout CSS (same convention as teams.css). */

/* ---------- List page ---------- */

.blog-list-wrapper {
    /* Matches the navbar container width so the grid's left edge lines up
       with the header logo on wide screens, same as the main page's hero
       (.main-container) sharing that width with its navbar. */
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.blog-list-heading {
    margin-bottom: 40px;
}

.blog-list-heading h1 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.blog-list-heading p {
    color: var(--color-text-muted);
    font-size: 15px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    border: 1px solid var(--border-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    top: 0;
    background-color: var(--bg-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    top: -6px;
    border-color: var(--border-hover);
    box-shadow: var(--shadow-hover);
}

.blog-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.blog-card-image-wrapper {
    height: 180px;
    width: 100%;
    overflow: hidden;
    border-bottom: 1px solid var(--border-card);
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.04);
}

.blog-card-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.blog-card-title {
    font-family: var(--font-heading);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 10px;
}

.blog-card-excerpt {
    color: var(--color-text-muted);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.blog-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}

.blog-card-tag,
.blog-detail-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--gray-950);
    background-color: var(--black-alpha-05);
    padding: 4px 10px;
    border-radius: 4px;
}

body.dark-theme .blog-card-tag,
body.dark-theme .blog-detail-tag {
    color: var(--white);
    background-color: var(--white-alpha-05);
}

.blog-empty-state {
    text-align: center;
    padding: 80px 40px;
    color: var(--color-text-muted);
}

.blog-empty-state i {
    font-size: 48px;
    margin-bottom: 20px;
}

/* ---------- Detail page ---------- */

.blog-detail-wrapper {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 48px 24px 80px;
}

.blog-detail-hero {
    width: 100%;
    max-height: 360px;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    margin-bottom: 32px;
}

.blog-detail-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-detail-header h1 {
    font-family: var(--font-heading);
    font-size: clamp(28px, 4vw, 38px);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin-bottom: 16px;
}

.blog-detail-meta {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

.blog-detail-meta i {
    color: var(--color-primary);
    margin-right: 6px;
}

.blog-detail-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}

.blog-detail-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-main);
}

.blog-detail-body h1,
.blog-detail-body h2,
.blog-detail-body h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    margin-top: 36px;
    margin-bottom: 16px;
}

.blog-detail-body p {
    margin-bottom: 24px;
}

.blog-detail-body ul,
.blog-detail-body ol {
    margin-left: 24px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-detail-body img {
    max-width: 100%;
    border-radius: var(--border-radius-md);
    margin: 24px 0;
}

.blog-detail-body a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: var(--color-primary);
}

/* Back button in blog layouts - ensure never underlined across all states */
.blog-page-body .back-fab,
.blog-page-body .back-fab:hover,
.blog-page-body .back-fab:focus,
.blog-page-body .back-fab:visited,
.blog-page-body .back-fab:active {
    text-decoration: none;
}
