/*!
 * Nabd — internet speed test (speed.doniaweb.com)
 * Copyright (c) 2026 Mahmoud Ali — doniaweb.com. All rights reserved.
 * Created: 2026-10-13
 */
/* Blog: list of cards and the post page. */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 18px; }
.blog-grid.small { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.blog-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; color: inherit; text-decoration: none; transition: transform .2s, border-color .2s; }
.blog-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--c1) 45%, var(--line)); }
.blog-cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--track); }
.blog-cover-empty { background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 30%, transparent), color-mix(in srgb, var(--c2) 30%, transparent)); }
.blog-card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.blog-card-body h2, .blog-card-body h3 { font-size: 1.08rem; line-height: 1.5; }
.blog-card-body p { color: var(--muted); font-size: .92rem; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card-body small { margin-top: auto; }
.blog-pager { display: flex; justify-content: center; gap: 12px; margin: 26px 0 6px; }

.blog-post { max-width: 820px; margin: 30px auto 10px; padding: 30px clamp(18px, 4vw, 44px); line-height: 1.9; }
.blog-post h1 { font-size: clamp(1.5rem, 4.4vw, 2.2rem); line-height: 1.4; }
.blog-meta { font-size: .88rem; margin: 6px 0 20px; }
.blog-hero { width: 100%; border-radius: 16px; margin-bottom: 22px; display: block; }
.blog-body h2 { font-size: 1.35rem; margin: 30px 0 10px; }
.blog-body h3 { font-size: 1.12rem; margin: 22px 0 8px; }
.blog-body h4 { font-size: 1rem; margin: 18px 0 6px; }
.blog-body p { margin: 10px 0; }
.blog-body ul, .blog-body ol { margin: 10px 0; padding-inline-start: 24px; }
.blog-body li { margin: 5px 0; }
.blog-body a { color: var(--c1); text-decoration: underline; text-underline-offset: 3px; }
.blog-body img { max-width: 100%; height: auto; border-radius: 12px; }
.blog-body figure { margin: 18px 0; }
.blog-body figcaption { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 6px; }
.blog-body blockquote { margin: 16px 0; padding: 10px 18px; border-inline-start: 4px solid var(--c1); background: var(--track); border-radius: 10px; }
.blog-body code { background: var(--track); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.blog-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.blog-related { max-width: 820px; margin: 26px auto; }
.blog-related h2 { font-size: 1.2rem; margin-bottom: 14px; }
.blog-body div[data-youtube-video] { margin: 18px 0; }
.blog-body div[data-youtube-video] iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; }

/* Phones: the post uses the full width (less frame, more text and picture). */
@media (max-width: 600px) {
  .blog-post { margin: 12px -8px 10px; padding: 22px 16px; border-radius: 18px; }
  .blog-hero { border-radius: 12px; margin-inline: -4px; width: calc(100% + 8px); }
  .blog-related { margin-inline: -8px; }
}
