/* ==========================================================================
   News Blog - MediaFire inspired styling
   ========================================================================== */
:root {
    --mf-blue: #1299f0;
    --mf-blue-dark: #0d6efd;
    --mf-blue-deep: #0a4fb4;
    --mf-ink: #1d2733;
    --mf-grey: #5b6b7c;
    --mf-light: #f4f7fb;
    --mf-border: #e6ecf3;
}

.mf-blog * { box-sizing: border-box; }

.mf-blog {
    background: #fff;
    color: var(--mf-ink);
    font-family: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Hero ---------- */
.mf-blog-hero {
    background: linear-gradient(135deg, var(--mf-blue) 0%, var(--mf-blue-deep) 100%);
    color: #fff;
    padding: 70px 20px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.mf-blog-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 60px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.5);
}
.mf-blog-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 14px;
    color: #fff;
    letter-spacing: -0.5px;
}
.mf-blog-hero p {
    font-size: 18px;
    opacity: .92;
    max-width: 640px;
    margin: 0 auto;
}

/* ---------- Layout container ---------- */
.mf-blog-wrap {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px 70px;
}
.mf-blog-grid-section { margin-top: -30px; position: relative; z-index: 2; }

/* ---------- Card grid ---------- */
.mf-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
@media (max-width: 900px) { .mf-blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .mf-blog-grid { grid-template-columns: 1fr; } }

.mf-card {
    background: #fff;
    border: 1px solid var(--mf-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 22px rgba(16, 42, 73, .06);
    transition: transform .22s ease, box-shadow .22s ease;
}
.mf-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 38px rgba(16, 42, 73, .14);
}
.mf-card-thumb {
    display: block;
    height: 190px;
    background: linear-gradient(135deg, #e9f3ff, #d4e8ff);
    overflow: hidden;
    position: relative;
}
.mf-card-thumb img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
.mf-card:hover .mf-card-thumb img { transform: scale(1.06); }
.mf-card-thumb-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: var(--mf-blue);
    font-size: 46px;
}
.mf-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.mf-card-meta {
    font-size: 12.5px;
    color: var(--mf-grey);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 8px;
}
.mf-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 10px;
}
.mf-card-title a { color: var(--mf-ink); text-decoration: none; }
.mf-card-title a:hover { color: var(--mf-blue); }
.mf-card-excerpt {
    font-size: 14.5px;
    color: var(--mf-grey);
    line-height: 1.6;
    flex: 1;
    margin: 0 0 18px;
}
.mf-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    color: var(--mf-blue);
    text-decoration: none;
    align-self: flex-start;
}
.mf-readmore::after { content: "\2192"; transition: transform .2s ease; }
.mf-readmore:hover { color: var(--mf-blue-deep); }
.mf-readmore:hover::after { transform: translateX(4px); }

/* ---------- Empty state ---------- */
.mf-blog-empty {
    text-align: center;
    padding: 70px 20px;
    color: var(--mf-grey);
}

/* ---------- Pagination ---------- */
.mf-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 46px;
}
.mf-pagination a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--mf-blue);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: background .2s ease;
}
.mf-pagination a:hover { background: var(--mf-blue-deep); }
.mf-pagination .mf-page-info { color: var(--mf-grey); font-size: 14px; }

/* ==========================================================================
   Single post
   ========================================================================== */
.mf-post-hero {
    background: linear-gradient(135deg, var(--mf-blue) 0%, var(--mf-blue-deep) 100%);
    color: #fff;
    padding: 60px 20px 70px;
    position: relative;
    overflow: hidden;
}
.mf-post-hero::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 50px;
    background: #fff;
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    transform: scaleX(1.5);
}
.mf-post-hero-inner { max-width: 820px; margin: 0 auto; }
.mf-post-back {
    color: rgba(255,255,255,.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}
.mf-post-back:hover { color: #fff; }
.mf-post-hero h1 {
    color: #fff;
    font-size: 36px;
    font-weight: 800;
    line-height: 1.25;
    margin: 16px 0 14px;
    letter-spacing: -0.5px;
}
.mf-post-hero-meta { font-size: 14px; opacity: .9; }

.mf-post-layout {
    max-width: 1080px;
    margin: -30px auto 70px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}
@media (max-width: 880px) { .mf-post-layout { grid-template-columns: 1fr; } }

.mf-post-main {
    background: #fff;
    border: 1px solid var(--mf-border);
    border-radius: 14px;
    box-shadow: 0 6px 22px rgba(16, 42, 73, .06);
    padding: 34px 38px 42px;
}
.mf-post-feature {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 26px;
    display: block;
}
.mf-post-content {
    font-size: 16.5px;
    line-height: 1.8;
    color: #34414f;
}
.mf-post-content p { margin: 0 0 18px; }
.mf-post-content h2, .mf-post-content h3 { color: var(--mf-ink); margin: 30px 0 14px; font-weight: 700; }
.mf-post-content img { max-width: 100%; height: auto; border-radius: 8px; }
.mf-post-content a { color: var(--mf-blue); }
.mf-post-content ul, .mf-post-content ol { margin: 0 0 18px; padding-left: 22px; }

/* ---------- Sidebar ---------- */
.mf-sidebar {
    background: var(--mf-light);
    border: 1px solid var(--mf-border);
    border-radius: 14px;
    padding: 24px 24px 26px;
}
.mf-sidebar h4 {
    font-size: 16px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 0 0 16px;
    color: var(--mf-ink);
}
.mf-sidebar-list { list-style: none; margin: 0 0 20px; padding: 0; }
.mf-sidebar-list li { padding: 12px 0; border-bottom: 1px solid var(--mf-border); }
.mf-sidebar-list li:last-child { border-bottom: 0; }
.mf-sidebar-list a { color: var(--mf-ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.4; display: block; }
.mf-sidebar-list a:hover { color: var(--mf-blue); }
.mf-sidebar-list .mf-sidebar-date { display: block; color: var(--mf-grey); font-size: 12.5px; margin-top: 4px; }
.mf-sidebar-btn {
    display: block;
    text-align: center;
    padding: 11px 16px;
    background: var(--mf-blue);
    color: #fff;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: background .2s ease;
}
.mf-sidebar-btn:hover { background: var(--mf-blue-deep); color: #fff; }
