/* ========================================
   BLOG.CSS - Blog listing + article styles
   ======================================== */

/* --- PAGE LAYOUT (push footer to bottom) --- */
body.blog-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.blog-page > main {
    flex: 1;
}

body.blog-page .site-footer {
    margin-top: auto;
}

/* --- STAR CANVAS --- */
#blog-star-canvas {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 0;
    pointer-events: none;
}

body.blog-page > main,
body.blog-page .site-footer {
    position: relative;
    z-index: 1;
}

/* --- BLOG LISTING --- */
.blog-listing {
    max-width: 820px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

.blog-listing__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    background: linear-gradient(to bottom, #fff, #D97D54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

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

/* --- BLOG CARD --- */
.blog-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

@media (hover: hover) {
    .blog-card:hover {
        transform: translateY(-4px);
        border-color: rgba(255, 255, 255, 0.14);
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(217, 125, 84, 0.06);
    }
    .blog-card:hover .blog-card__title {
        filter: brightness(1.25);
    }
    .blog-card:hover .blog-card__excerpt {
        opacity: 0.9;
    }
    .blog-card:hover .blog-card__read-more {
        color: #E6A67A;
    }
    .blog-card:hover .blog-card__image::after {
        opacity: 1;
    }
}

.blog-card:active {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

.blog-card__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, rgba(217, 125, 84, 0.15) 0%, rgba(8, 10, 16, 0.6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.blog-card__image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(217, 125, 84, 0.2) 0%, rgba(8, 10, 16, 0.35) 100%);
    mix-blend-mode: lighten;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.blog-card__body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.blog-card__date {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 0.5rem;
}

.blog-card__title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    background: linear-gradient(to bottom, #fff, #D97D54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.35;
    transition: filter 0.3s ease;
}

.blog-card__excerpt {
    font-size: 0.92rem;
    line-height: 1.55;
    color: #E6D5C3;
    opacity: 0.75;
    flex: 1;
    transition: opacity 0.3s ease;
}

.blog-card__read-more {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: #D97D54;
    font-weight: 500;
    transition: color 0.3s ease;
}

/* --- BLOG ARTICLE CONTENT --- */
.blog-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
    color: #E6D5C3;
}

.blog-content__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(to bottom, #fff, #D97D54);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.blog-content__meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 2.5rem;
}

.blog-hero-image {
    width: 100%;
    margin-bottom: 2.5rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

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

.blog-content h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #fff;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.blog-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.blog-content p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.blog-content ul,
.blog-content ol {
    font-size: 1rem;
    line-height: 1.7;
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.blog-content li {
    margin-bottom: 0.4rem;
}

.blog-content blockquote {
    border-left: 3px solid #D97D54;
    padding: 0.75rem 1.25rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: rgba(230, 213, 195, 0.8);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 0 8px 8px 0;
}

.blog-content img {
    max-width: 100%;
    height: auto;
    margin: 0.25rem 0;
    display: block;
}

.blog-content code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 0.88em;
    background: rgba(255, 255, 255, 0.06);
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: #E6C9A8;
}

.blog-content pre {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-content pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.85rem;
    line-height: 1.6;
}

.blog-content a {
    color: #D97D54;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.blog-content a:hover {
    color: #E6D5C3;
}

.blog-content strong {
    color: #fff;
    font-weight: 600;
}

.blog-cta-wrap {
    position: relative;
    margin: 3rem 0;
}

.blog-cta-wrap::before {
    content: '';
    position: absolute;
    inset: 6px 15%;
    border-radius: 999vw;
    background: rgba(192, 86, 56, 0.4);
    filter: blur(24px);
    pointer-events: none;
    transition: background 0.3s ease, filter 0.3s ease;
}

.blog-cta-wrap:hover::before {
    background: rgba(192, 86, 56, 0.55);
    filter: blur(30px);
}

.blog-content a.blog-cta,
.blog-content a.blog-cta:hover {
    color: #E6D5C3;
    text-decoration: none;
}

.blog-cta {
    display: block;
    position: relative;
    text-align: center;
    padding: 1.1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    border-radius: 999vw;
    background: linear-gradient(
        -75deg,
        rgba(192, 86, 56, 0.15),
        rgba(192, 86, 56, 0.45),
        rgba(192, 86, 56, 0.15)
    );
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    box-shadow:
        inset 0 -0.125em 1em -0.1em rgba(192, 86, 56, 0.5),
        inset 0 0 0.2em 0.25em rgba(192, 86, 56, 0.2),
        0 0.25em 0.125em -0.125em rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
}

.blog-cta:hover {
    transform: scale(0.975);
    box-shadow:
        inset 0 -0.125em 0.125em rgba(192, 86, 56, 0.5),
        inset 0 0 0.05em 0.1em rgba(192, 86, 56, 0.5),
        0 0.15em 0.05em -0.1em rgba(0, 0, 0, 0.25);
}

.blog-cta:active {
    transform: scale(0.93);
    transition: transform 0.1s ease;
}

.blog-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.blog-related h2 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 0.75rem;
}

.blog-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.blog-related a {
    color: #D97D54;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

.blog-related a:hover {
    color: #E6D5C3;
}

.blog-back {
    display: inline-block;
    margin-top: 2rem;
    color: #D97D54;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.blog-back:hover {
    color: #E6D5C3;
}

/* --- BLOG COMPARISON TABLE --- */
.blog-comparison {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.blog-comparison thead tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.blog-comparison th {
    padding: 0.75rem 0.75rem;
    font-weight: 600;
    vertical-align: bottom;
}

.blog-comparison th.bc-feature {
    text-align: left;
    color: #fff;
}

.blog-comparison th.bc-dimify,
.blog-comparison th.bc-other {
    text-align: center;
}

.bc-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.bc-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.bc-other .bc-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
}

.blog-comparison th.bc-dimify {
    color: #D97D54;
}

.blog-comparison th.bc-other {
    color: rgba(255, 255, 255, 0.5);
}

.blog-comparison tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.blog-comparison tbody tr:last-child {
    border-bottom: none;
}

.blog-comparison td {
    padding: 0.5rem 0.75rem;
}

.blog-comparison td.bc-dimify {
    text-align: center;
}

.blog-comparison td:last-child {
    text-align: center;
}

.bc-yes {
    color: #4CD964;
}

.bc-no {
    color: rgba(255, 69, 58, 0.6);
}

.bc-pro {
    font-weight: 600;
    background: linear-gradient(135deg, #9B45A8, #D86878, #E88858);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bc-muted {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.9em;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
    .blog-listing {
        padding: 2rem 1.25rem 3rem;
    }
    .blog-listing__title {
        font-size: 1.85rem;
    }
    .blog-content {
        padding: 2rem 1.25rem 3rem;
    }
    .blog-content__title {
        font-size: 1.85rem;
    }
}

@media (max-width: 400px) {
    .blog-listing__title {
        font-size: 1.5rem;
    }
    .blog-content__title {
        font-size: 1.5rem;
    }
}
