/* blog-theme.css - Premium Design for SIMpowering Blog */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Brand Colors - Refined */
    --blog-primary: #d6336c;
    /* Existing pink */
    --blog-primary-dark: #a61e4d;
    --blog-primary-light: #ffdeeb;
    --blog-accent: #6366f1;
    /* Indigo for accents */
    --blog-bg: #f8f9fa;
    --blog-surface: #ffffff;
    --blog-text-main: #1f2937;
    --blog-text-muted: #6b7280;

    /* Typography */
    --font-sans: 'Outfit', sans-serif;
    --font-serif: 'Playfair Display', serif;

    /* Spacing & Layout */
    --container-width: 900px;
    --radius-lg: 8px;
    --radius-md: 8px;
    --radius-sm: 8px;

    /* Effects */
    --shadow-soft: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 20px 50px -12px rgba(214, 51, 108, 0.25);
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --backdrop-blur: blur(12px);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Overrides for Blog Pages */
body {
    background-color: var(--blog-bg);
    font-family: var(--font-sans);
    color: var(--blog-text-main);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(214, 51, 108, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--blog-text-main);
    letter-spacing: -0.02em;
}

/* --- Blog Hero Section --- */
.blog-hero {
    text-align: center;
    padding: 80px 20px 60px;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(214, 51, 108, 0.08) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.blog-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--blog-text-main) 0%, var(--blog-primary) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.blog-hero p {
    font-size: 1.25rem;
    color: var(--blog-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* --- Blog List & Cards --- */
.blog-list {
    max-width: var(--container-width);
    margin: 0 auto 80px;
    padding: 0 20px;
    display: grid;
    gap: 40px;
}

.blog-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    background: var(--blog-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-base);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    isolation: isolate;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.blog-thumb {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 240px;
}

.blog-thumb img {
    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-thumb img {
    transform: scale(1.05);
}

.blog-body {
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-body h2 {
    font-size: 1.75rem;
    margin: 0 0 12px;
}

.blog-body h2 a {
    text-decoration: none;
    color: inherit;
    background: linear-gradient(to right, var(--blog-primary), var(--blog-primary));
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size 0.3s ease;
}

.blog-card:hover .blog-body h2 a {
    background-size: 100% 2px;
    color: var(--blog-primary);
}

.blog-meta {
    font-family: var(--font-sans);
    font-size: 0.875rem;
    color: var(--blog-accent);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.blog-body p {
    color: var(--blog-text-muted);
    margin-bottom: 24px;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--blog-primary);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.read-more:hover {
    gap: 12px;
}

/* --- Single Post Styles --- */
.blog-container {
    max-width: 800px;
    margin: 40px auto 80px;
    background: var(--glass-bg);
    backdrop-filter: var(--backdrop-blur);
    -webkit-backdrop-filter: var(--backdrop-blur);
    padding: 60px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: var(--glass-border);
}

.back-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    border-radius: 99px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--blog-text-muted);
    text-decoration: none;
    margin-bottom: 32px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition-base);
}

.back-link:hover {
    transform: translateX(-4px);
    color: var(--blog-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.blog-title {
    font-size: 3rem;
    margin-bottom: 24px;
    color: var(--blog-text-main);
}

.blog-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: #374151;
}

.blog-content p {
    margin-bottom: 1.5em;
}

.blog-content h2 {
    font-size: 2rem;
    margin-top: 2.5em;
    margin-bottom: 1em;
    color: var(--blog-primary-dark);
}

.blog-content strong {
    color: var(--blog-primary-dark);
}

/* --- Animations --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card,
.blog-container {
    animation: fadeUp 0.6s ease-out forwards;
}

.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.5rem;
    }

    .blog-card {
        grid-template-columns: 1fr;
        grid-template-rows: 240px auto;
    }

    .blog-container {
        padding: 30px 20px;
        margin: 20px;
    }

    .blog-title {
        font-size: 2.25rem;
    }
}