/* =========================================
   PREMIUM BLOG STYLES
   ========================================= */

/* Grid Layout */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
    padding: 1rem 0 3rem;
}

/* Blog Card */
.blog-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    top: 0;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.blog-card-image-wrapper {
    position: relative;
    height: 260px;
    overflow: hidden;
}

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-image {
    transform: scale(1.05);
}

.blog-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0EA09D;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.blog-card-content {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-date {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.blog-card-excerpt {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.read-more-link {
    color: #0EA09D;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    transition: gap 0.3s ease;
}

.read-more-link:hover {
    gap: 0.75rem;
    color: #0284c7;
}

/* Single Post Styles */
.single-post-container {
    padding-bottom: 4rem;
}

.single-post-hero {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    height: 60vh;
    min-height: 400px;
    position: relative;
    margin-bottom: 4rem;
    margin-top: -2rem;
    /* Pull up to navbar */
}

.single-post-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 4rem;
}

.single-post-header-content {
    max-width: 900px;
    text-align: center;
    color: white;
    padding: 0 2rem;
}

.single-post-badge {
    background: #0EA09D;
    color: white;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.4);
}

.single-post-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 2rem;
    }

    .single-post-hero {
        height: 50vh;
    }
}

.single-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.single-post-body {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.15rem;
    line-height: 1.8;
    color: #334155;
    padding: 0 1.5rem;
}

.single-post-body p {
    margin-bottom: 1.75rem;
}

.single-post-body h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.single-post-body h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.single-post-body ul,
.single-post-body ol {
    margin-bottom: 1.75rem;
    padding-left: 2rem;
}

.single-post-body li {
    margin-bottom: 0.75rem;
}

.single-post-body img {
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
    width: 100%;
}

.single-post-tags {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.post-tag {
    background: #f1f5f9;
    color: #475569;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.post-tag:hover {
    background: #e2e8f0;
    color: #334155;
}

/* Loading State Helpers */
.loading-container {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6rem 1rem;
    width: 100%;
    min-height: 300px;
}

.loading-spinner-premium {
    width: 50px;
    height: 50px;
    border: 3px solid #e2e8f0;
    border-radius: 50%;
    border-top-color: var(--color-primary);
    animation: spin 1s linear infinite;
    margin-bottom: 1.5rem;
}

.loading-text {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
    letter-spacing: 0.02em;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
