/* ─────────────────────────────────────────────────────────────────────────
   MagnetOti — Blog Style (single posts, archive, category)
   ───────────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Heebo', sans-serif;
    direction: rtl;
    text-align: right;
    background: #f8f9fb;
    color: #1a1a2e;
    margin: 0;
    padding: 0;
    font-weight: 400;
    line-height: 1.8;
}

/* ── Layout ────────────────────────────────────────────────────────────── */
.blog-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

/* ── Post header ────────────────────────────────────────────────────────── */
.post-header {
    margin-bottom: 36px;
}

.post-category-badge {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 14px;
    text-decoration: none;
    letter-spacing: 0.3px;
}

.post-title {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    margin: 0 0 16px;
}

.post-meta {
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.post-meta span { display: flex; align-items: center; gap: 5px; }

/* ── Featured image ────────────────────────────────────────────────────── */
.post-featured-image {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 36px;
    aspect-ratio: 16/7;
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ── Post content ──────────────────────────────────────────────────────── */
.post-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px 48px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}

.post-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 36px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.post-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e293b;
    margin: 24px 0 8px;
}

.post-content p {
    font-size: 1.05rem;
    line-height: 1.9;
    color: #334155;
    margin: 0 0 18px;
}

.post-content ul, .post-content ol {
    padding-right: 20px;
    padding-left: 0;
    margin: 0 0 18px;
}

.post-content li {
    font-size: 1.02rem;
    line-height: 1.85;
    color: #334155;
    margin-bottom: 8px;
}

.post-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.post-content a:hover { color: #7c3aed; }

.post-content strong { font-weight: 700; color: #0f172a; }

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 0.95rem;
}

.post-content th, .post-content td {
    border: 1px solid #e2e8f0;
    padding: 10px 16px;
    text-align: right;
}

.post-content th {
    background: #f1f5f9;
    font-weight: 600;
    color: #0f172a;
}

/* ── CTA box inside post ────────────────────────────────────────────────── */
.post-cta-box {
    background: linear-gradient(135deg, #2563eb14, #7c3aed14);
    border: 1px solid #7c3aed33;
    border-radius: 14px;
    padding: 28px 32px;
    margin: 36px 0;
    text-align: center;
}

.post-cta-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 10px;
    color: #0f172a;
}

.post-cta-box p { color: #475569; margin: 0 0 18px; font-size: 0.95rem; }

.post-cta-btn {
    display: inline-block;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 12px 32px;
    border-radius: 50px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(37,99,235,0.35);
}

.post-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37,99,235,0.45);
    color: #fff;
    text-decoration: none;
}

/* ── Author / share bar ─────────────────────────────────────────────────── */
.post-footer-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    flex-wrap: wrap;
    gap: 12px;
}

.post-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #2563eb;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
}

.post-back-link:hover { color: #7c3aed; }

.post-share {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #64748b;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.share-btn:hover { opacity: 0.85; text-decoration: none; }
.share-btn-wa  { background: #25D366; color: #fff; }
.share-btn-fb  { background: #1877f2; color: #fff; }

/* ── Related posts ──────────────────────────────────────────────────────── */
.related-posts {
    margin-top: 56px;
}

.related-posts h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.related-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    border: 1px solid #f1f5f9;
}

.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
    text-decoration: none;
}

.related-card h3 {
    font-size: 0.97rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.4;
    margin: 0;
}

/* ── Archive / blog list ────────────────────────────────────────────────── */
.blog-archive-header {
    text-align: center;
    margin-bottom: 48px;
}

.blog-archive-header h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.blog-archive-header p {
    color: #64748b;
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.blog-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    border: 1px solid #f1f5f9;
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}

.blog-card-thumb {
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #2563eb22, #7c3aed22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.blog-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.blog-card-body { padding: 22px 20px 24px; flex: 1; display: flex; flex-direction: column; }

.blog-card-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: #7c3aed;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    text-decoration: none;
}

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
    margin: 0 0 10px;
    text-decoration: none;
    display: block;
}

.blog-card-title:hover { color: #2563eb; }

.blog-card-excerpt {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-card-read-more:hover { color: #7c3aed; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .blog-wrapper { padding: 24px 16px 60px; }
    .post-content { padding: 24px 20px; }
    .post-cta-box { padding: 22px 18px; }
    .related-grid { grid-template-columns: 1fr; }
    .blog-posts-grid { grid-template-columns: 1fr; }
}
