/* ============================================
   BLOG STYLES - Matthew Thomas Creative
   ============================================ */

/* --- Blog Intro --- */
.blog-intro {
    text-align: center;
    margin-bottom: 50px;
}

.blog-main-title {
    font-size: 4.5rem;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.blog-main-subtitle {
    font-size: 1.15rem;
    color: #555;
    font-weight: 300;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Category Filter Buttons --- */
.blog-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 60px;
}

.blog-filter-btn {
    padding: 12px 28px;
    border-radius: 50px;
    border: 2px solid #e0e0e0;
    background-color: transparent;
    color: #555;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    white-space: nowrap;
}

.blog-filter-btn:hover {
    border-color: #35A7FF;
    color: #35A7FF;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(53, 167, 255, 0.15);
}

.blog-filter-btn.active {
    background-color: #111;
    border-color: #111;
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.blog-filter-btn.active:hover {
    background-color: #35A7FF;
    border-color: #35A7FF;
    color: #fff;
}

/* --- Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* --- Blog Card --- */
.blog-card {
    border-radius: 16px;
    overflow: hidden;
    background-color: #f8f9fa;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                box-shadow 0.4s ease,
                opacity 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

/* Animate in when section is visible */
.content-section.visible .blog-card {
    opacity: 1;
    transform: translateY(0);
}

.content-section.visible .blog-card:nth-child(1) { transition-delay: 0.1s; }
.content-section.visible .blog-card:nth-child(2) { transition-delay: 0.2s; }
.content-section.visible .blog-card:nth-child(3) { transition-delay: 0.3s; }
.content-section.visible .blog-card:nth-child(4) { transition-delay: 0.4s; }
.content-section.visible .blog-card:nth-child(5) { transition-delay: 0.5s; }
.content-section.visible .blog-card:nth-child(6) { transition-delay: 0.6s; }

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Hidden state for filter animation */
.blog-card.hidden {
    display: none;
}

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

/* --- Card Image --- */
.blog-card-image {
    position: relative;
    padding-top: 60%;
    overflow: hidden;
    background-color: #e0e0e0;
}

.blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Category Badge */
.blog-card-category {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    z-index: 2;
}

/* --- Card Content --- */
.blog-card-content {
    padding: 28px 28px 32px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #999;
    font-weight: 400;
    margin-bottom: 10px;
    display: block;
}

.blog-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: #35A7FF;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: #666;
    font-weight: 300;
    line-height: 1.65;
    margin-bottom: 20px;
    flex-grow: 1;

    /* Clamp to 3 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.blog-card-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #111;
    transition: color 0.3s ease, gap 0.3s ease;
    margin-top: auto;
}

.blog-card-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-read-more {
    color: #35A7FF;
}

.blog-card:hover .blog-card-read-more svg {
    transform: translateX(4px);
}

/* --- Empty State --- */
.blog-empty-state {
    text-align: center;
    padding: 80px 20px;
}

.blog-empty-state p {
    font-size: 1.1rem;
    color: #999;
    font-weight: 300;
}

/* ============================================
   BLOG ARTICLE PAGE STYLES
   ============================================ */

/* Article Hero */
.blog-article-hero {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    background-color: #111;
    display: flex;
    align-items: flex-end;
}

.blog-article-hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.blog-article-hero-overlay {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 60px 40px 50px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
}

.blog-article-hero-content {
    max-width: 850px;
    margin: 0 auto;
}

.blog-article-category-badge {
    display: inline-block;
    background-color: #35A7FF;
    color: #fff;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}

.blog-article-title {
    font-size: 3.2rem;
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 15px;
}

.blog-article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    font-weight: 300;
}

.blog-article-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-article-meta svg {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Article Body */
.blog-article-body {
    max-width: 750px;
    margin: 0 auto;
    padding: 70px 20px 100px;
}

.blog-article-body h2 {
    font-size: 2rem;
    font-weight: 900;
    color: #1a1a1a;
    margin-top: 50px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.blog-article-body h2:first-child {
    margin-top: 0;
}

.blog-article-body p {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 25px;
}

.blog-article-body p strong {
    font-weight: 700;
    color: #1a1a1a;
}

.blog-article-body blockquote {
    border-left: 4px solid #35A7FF;
    margin: 40px 0;
    padding: 25px 30px;
    background-color: #f8f9fa;
    border-radius: 0 12px 12px 0;
}

.blog-article-body blockquote p {
    font-size: 1.15rem;
    color: #333;
    font-weight: 400;
    font-style: italic;
    margin-bottom: 0;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 25px 0;
    padding-left: 25px;
}

.blog-article-body li {
    font-size: 1.1rem;
    color: #444;
    line-height: 1.85;
    font-weight: 300;
    margin-bottom: 10px;
}

.blog-article-body li strong {
    font-weight: 700;
    color: #1a1a1a;
}

/* Divider */
.blog-article-divider {
    width: 60px;
    height: 4px;
    background-color: #35A7FF;
    border: none;
    border-radius: 2px;
    margin: 50px auto;
}

/* Back to Blog Link */
.blog-back-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 32px;
    background-color: #111;
    color: #fff;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    margin-top: 20px;
}

.blog-back-link:hover {
    background-color: #35A7FF;
    transform: translateY(-2px);
}

.blog-back-link svg {
    width: 18px;
    height: 18px;
    transform: rotate(180deg);
}

/* Related Posts */
.blog-related-section {
    background-color: #f4f5f7;
    padding: 80px 40px;
}

.blog-related-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.blog-related-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 50px;
}

.blog-related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

/* ============================================
   RESPONSIVE - BLOG
   ============================================ */

@media (max-width: 992px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .blog-main-title {
        font-size: 3.5rem;
    }

    .blog-article-title {
        font-size: 2.5rem;
    }

    .blog-article-body {
        padding: 50px 20px 80px;
    }
}

@media (max-width: 768px) {
    .blog-intro {
        margin-bottom: 35px;
    }

    .blog-main-title {
        font-size: 3rem;
    }

    .blog-main-subtitle {
        font-size: 1.05rem;
    }

    .blog-filters {
        gap: 0.5rem;
        margin-bottom: 40px;
    }

    .blog-filter-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

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

    .blog-card-content {
        padding: 22px 22px 28px;
    }

    .blog-card-title {
        font-size: 1.2rem;
    }

    /* Article Page Mobile */
    .blog-article-hero {
        height: 50vh;
        min-height: 320px;
    }

    .blog-article-hero-overlay {
        padding: 40px 20px 35px;
    }

    .blog-article-title {
        font-size: 2rem;
    }

    .blog-article-meta {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 0.85rem;
    }

    .blog-article-body {
        padding: 40px 15px 60px;
    }

    .blog-article-body h2 {
        font-size: 1.6rem;
        margin-top: 40px;
    }

    .blog-article-body p,
    .blog-article-body li {
        font-size: 1.05rem;
    }

    .blog-related-section {
        padding: 60px 20px;
    }

    .blog-related-title {
        font-size: 2rem;
    }

    .blog-related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-main-title {
        font-size: 2.5rem;
    }

    .blog-filter-btn {
        padding: 8px 16px;
        font-size: 0.8rem;
    }

    .blog-article-title {
        font-size: 1.7rem;
    }

    .blog-article-body h2 {
        font-size: 1.4rem;
    }
}