/* ============================================
   BLOG STYLES - SMOOTH UX/UI
   Easing: cubic-bezier(0.16, 1, 0.3, 1) for buttery feel
   ============================================ */

/* ============ BLOG LISTING PAGE ============ */
.blog-page {
    padding-top: 72px;
    min-height: 100vh;
    background: var(--bg-white);
}

.blog-post-page {
    padding-top: 72px;
}

.blog-header {
    text-align: center;
    padding: 60px 24px 40px;
    max-width: 700px;
    margin: 0 auto;
}

.blog-header h1 {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--text-dark);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.blog-header p {
    color: #6B7280;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Featured post - hero card */
.blog-featured {
    max-width: 1200px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.featured-card {
    display: block;
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 21/9;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0,0,0,0.14);
}

.featured-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover img {
    transform: scale(1.03);
}

.featured-card .featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 50%, transparent 100%);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-overlay {
    opacity: 0.9;
}

.featured-card .featured-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 40px;
    z-index: 2;
    transform: translateY(4px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-content {
    transform: translateY(0);
}

.featured-card .featured-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.featured-card .featured-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-card .featured-icon img {
    width: 20px;
    height: 20px;
}

.featured-card .featured-author {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.featured-card .featured-date {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
}

.featured-card .featured-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    line-height: 1.4;
    max-width: 600px;
}

/* Blog grid */
.blog-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Blog card - buttery smooth transitions */
.blog-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    overflow: hidden;
    background: var(--bg-white);
    border: 1px solid rgba(0,0,0,0.06);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 56px rgba(0,0,0,0.1);
    border-color: rgba(0,0,0,0.02);
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: linear-gradient(135deg, #43B39A 0%, #2d8f78 100%);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

.blog-card-image .card-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover .blog-card-image .card-icon {
    opacity: 1;
    transform: translateY(0);
}

.blog-card-image .card-icon svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
}

.blog-card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-subtitle {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    color: #9CA3AF;
    font-size: 0.8rem;
}

.blog-card-meta .category {
    color: var(--accent);
    font-weight: 600;
}

.blog-card-meta .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #D1D5DB;
}

.blog-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 8px;
    flex: 1;
    transition: color 0.4s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

.blog-card-excerpt {
    color: #6B7280;
    font-size: 0.85rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============ BLOG POST PAGE ============ */
.post-hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 24px 0;
    text-align: center;
}

.post-hero .post-category {
    display: inline-block;
    background: rgba(67,179,154,0.1);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.post-hero h1 {
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.post-hero .post-meta-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 32px;
}

.post-hero-image {
    max-width: 900px;
    margin: 0 auto 40px;
    padding: 0 24px;
    border-radius: 16px;
    overflow: hidden;
}

.post-hero-image img {
    width: 100%;
    border-radius: 16px;
}

/* Post content - smooth reading experience */
.post-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 24px 80px;
    font-size: 1.05rem;
    line-height: 1.9;
    color: #374151;
}

.post-content h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 48px 0 16px;
    letter-spacing: -0.01em;
}

.post-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 32px 0 12px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul, .post-content ol {
    margin: 16px 0 20px 24px;
    padding: 0;
}

.post-content li {
    margin-bottom: 8px;
    list-style: disc;
}

.post-content ol li {
    list-style: decimal;
}

.post-content strong {
    color: var(--text-dark);
    font-weight: 700;
}

.post-content blockquote {
    border-right: 4px solid var(--accent);
    padding: 16px 24px;
    margin: 24px 0;
    background: rgba(67,179,154,0.04);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #4B5563;
}

/* CTA box in post - gentle entrance */
.post-cta-box {
    background: linear-gradient(135deg, var(--accent), #2d8f78);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    margin: 48px 0;
    color: white;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-cta-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 48px rgba(67,179,154,0.25);
}

.post-cta-box h3 {
    color: white;
    font-size: 1.4rem;
    margin: 0 0 12px;
}

.post-cta-box p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 20px;
}

.post-cta-box a {
    display: inline-block;
    background: white;
    color: var(--accent);
    padding: 12px 32px;
    border-radius: 999px;
    font-weight: 700;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.post-cta-box a:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Back to blog link */
.back-to-blog {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.back-to-blog:hover {
    color: var(--accent);
    gap: 12px;
}

/* Related posts */
.related-posts {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.related-posts h2 {
    font-size: 1.6rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 32px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog-header h1 {
        font-size: 2rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-card {
        aspect-ratio: 16/9;
    }

    .featured-card .featured-title {
        font-size: 1.3rem;
    }

    .featured-card .featured-content {
        padding: 24px;
    }

    .post-hero h1 {
        font-size: 1.8rem;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}
