/* =============================================
   MEWA Foundation Blog — Glassmorphism Theme
   Matches main site design system
   ============================================= */

/* --- 1. Blog Global Resets & Variables --- */
:root {
    --primary-gradient: linear-gradient(135deg, #00C853 0%, #009624 100%);
    --accent-gradient: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    --glass-blur: blur(25px);
    --text-light: #FFFFFF;
    --font-main: 'Outfit', sans-serif;
    --radius-lg: 2rem;
    --radius-md: 1.5rem;
    --radius-sm: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-light);
    background-color: #0d0d0d;
    overflow-x: hidden;
    position: relative;
    width: 100%;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 2. Background Mesh (same as main site) --- */
.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background:
        radial-gradient(circle at 15% 50%, rgba(76, 175, 80, 0.35), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(33, 150, 243, 0.35), transparent 25%),
        radial-gradient(circle at 50% 80%, rgba(255, 87, 34, 0.3), transparent 30%);
    filter: blur(80px);
    opacity: 0.8;
    animation: liquidMove 20s ease-in-out infinite alternate;
}

@keyframes liquidMove {
    0% {
        transform: scale(1);
        filter: blur(80px);
    }

    50% {
        transform: scale(1.1);
        filter: blur(100px);
    }

    100% {
        transform: scale(1);
        filter: blur(80px);
    }
}

/* --- 3. Blog Header (Glass Pill) --- */
.blog-header {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    position: fixed;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 1200px;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transition: 0.4s;
}

.blog-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4.5rem;
    padding: 0 2rem;
}

.blog-header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.blog-header-brand img {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 4px;
}

.blog-header-brand span {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    letter-spacing: -0.01em;
}

.blog-header-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    transform: translateY(-1px);
}

/* --- 4. Blog Hero Banner --- */
.blog-hero {
    padding-top: 8rem;
    padding-bottom: 3rem;
    text-align: center;
}

.blog-hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(to bottom, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    line-height: 1.15;
}

.blog-hero p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.15rem;
    max-width: 550px;
    margin: 0 auto;
}

/* --- 5. Search & Filter Bar --- */
.blog-controls {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: center;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 220px;
}

.search-box input {
    width: 100%;
    padding: 0.85rem 1.25rem 0.85rem 3rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    font-family: var(--font-main);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-box input:focus {
    border-color: rgba(0, 200, 83, 0.5);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 200, 83, 0.1);
}

.search-box i {
    position: absolute;
    left: 1.15rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.95rem;
    pointer-events: none;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-main);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-pill:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.filter-pill.active {
    background: var(--primary-gradient);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(0, 200, 83, 0.3);
}

/* --- 6. Blog Cards Grid --- */
.blog-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.blog-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: 0.5s;
    pointer-events: none;
    z-index: 0;
}

.blog-card:hover {
    transform: translateY(-12px) scale(1.02);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
}

.blog-card:hover::after {
    opacity: 1;
}

.blog-card-thumbnail {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.blog-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.blog-card:hover .blog-card-thumbnail img {
    transform: scale(1.08);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.85rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-gradient);
    color: #fff;
    z-index: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.blog-card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.blog-card-meta i {
    margin-right: 0.3rem;
}

.blog-card-body h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    letter-spacing: -0.01em;
    transition: color 0.3s;
}

.blog-card:hover .blog-card-body h3 {
    color: #4ade80;
}

.blog-card-body p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    line-height: 1.6;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.read-more {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4ade80;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.3s;
}

.blog-card:hover .read-more {
    gap: 0.8rem;
}

.reading-time {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

/* --- 7. Empty State --- */
.blog-empty {
    text-align: center;
    padding: 6rem 2rem;
    max-width: 500px;
    margin: 0 auto;
}

.blog-empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.blog-empty h2 {
    font-size: 1.8rem;
    color: var(--text-light);
    margin-bottom: 0.75rem;
}

.blog-empty p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* --- 8. Blog Footer --- */
.blog-footer {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #888;
    text-align: center;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: auto;
}

/* --- 9. Post Page Typography --- */
.post-container {
    max-width: 780px;
    margin: 0 auto;
    padding: 8rem 2rem 4rem;
}

.post-header {
    text-align: center;
    margin-bottom: 3rem;
}

.post-category-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--primary-gradient);
    color: #fff;
    margin-bottom: 1.25rem;
}

.post-header h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    background: linear-gradient(to bottom, #fff, #ccc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.25rem;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.95rem;
    flex-wrap: wrap;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.post-hero-image {
    width: 100%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 3rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.post-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-content {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.85;
}

.post-content h2 {
    font-size: 1.8rem;
    color: var(--text-light);
    margin: 2.5rem 0 1rem;
    font-weight: 700;
}

.post-content h3 {
    font-size: 1.4rem;
    color: var(--text-light);
    margin: 2rem 0 0.75rem;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 1.25rem;
}

.post-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
}

.post-content blockquote {
    border-left: 4px solid #4ade80;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
}

.post-content ul,
.post-content ol {
    margin: 1rem 0 1.25rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content a {
    color: #4ade80;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover {
    color: #86efac;
}

/* --- 10. Share Buttons --- */
.post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.post-share span {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
}

.share-btn {
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.share-btn:hover {
    background: var(--primary-gradient);
    color: #fff;
    transform: translateY(-3px) rotate(5deg);
    box-shadow: 0 8px 20px rgba(0, 200, 83, 0.3);
}

/* --- 11. Responsive --- */
@media (max-width: 768px) {
    .blog-hero h1 {
        font-size: 2.2rem;
    }

    .blog-hero p {
        font-size: 1rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem 3rem;
    }

    .blog-header-inner {
        padding: 0 1rem;
    }

    .blog-header-brand span {
        display: none;
    }

    .blog-controls {
        padding: 0 1rem;
        flex-direction: column;
    }

    .search-box {
        max-width: 100%;
        width: 100%;
    }

    .post-container {
        padding: 7rem 1.25rem 3rem;
    }

    .post-header h1 {
        font-size: 1.8rem;
    }

    .post-content {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding-top: 7rem;
        padding-bottom: 2rem;
    }

    .blog-hero h1 {
        font-size: 1.8rem;
    }

    .blog-card-thumbnail {
        height: 180px;
    }

    .blog-card-body h3 {
        font-size: 1.15rem;
    }
}

/* --- 12. Loading Skeleton --- */
.skeleton-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    animation: shimmer 1.5s infinite;
}

.skeleton-thumbnail {
    width: 100%;
    height: 220px;
    background: rgba(255, 255, 255, 0.05);
}

.skeleton-body {
    padding: 1.5rem;
}

.skeleton-line {
    height: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    margin-bottom: 0.75rem;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.title {
    height: 20px;
    width: 80%;
}

@keyframes shimmer {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}