/* Blog Listing + Single Post */
.blog-hero{padding:80px 0 48px;text-align:center;background:#f8faff}
.blog-hero h1{font-size:clamp(1.8rem,4vw,2.8rem);margin-bottom:10px}
.blog-hero p{color:#666}
.blog-section{padding:64px 0;background:#fff}

.blog-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:28px}
.blog-grid-3{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.blog-card{background:#fff;border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;transition:.2s}
.blog-card:hover{box-shadow:0 8px 24px rgba(0,0,0,.08);transform:translateY(-3px)}
.blog-thumb{display:block;height:200px;background:#f3f4f6;overflow:hidden}
.blog-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s}
.blog-card:hover .blog-thumb img{transform:scale(1.04)}
.blog-thumb-placeholder{background:linear-gradient(135deg,#e0f3ff,#f0f9ff)}
.blog-body{padding:20px}
.blog-date{font-size:12px;color:#888;text-transform:uppercase;letter-spacing:.5px}
.blog-title{font-size:1.05rem;margin:8px 0 10px;line-height:1.4}
.blog-title a{text-decoration:none;color:#111;transition:.15s}
.blog-title a:hover{color:#00AEEF}
.blog-excerpt{font-size:.88rem;color:#666;line-height:1.6;margin-bottom:14px}
.read-more{font-size:.85rem;font-weight:600;color:#00AEEF;text-decoration:none}
.read-more:hover{text-decoration:underline}
.blog-empty{text-align:center;padding:80px 0;color:#888}
.pagination{display:flex;gap:8px;justify-content:center;margin-top:48px}
.page-link{width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:1px solid #e5e7eb;border-radius:6px;text-decoration:none;color:#555;font-size:.9rem;transition:.15s}
.page-link.active,.page-link:hover{background:#00AEEF;border-color:#00AEEF;color:#fff}

/* Single post */
.post-header{padding:80px 0 48px;background:#f8faff;text-align:center}
.post-date{font-size:13px;color:#00AEEF;text-transform:uppercase;letter-spacing:.5px}
.post-title{font-size:clamp(1.8rem,4vw,3rem);margin:12px 0 16px;line-height:1.2}
.post-lead{font-size:1.1rem;color:#555;max-width:660px;margin:0 auto}
.post-hero-image{padding:24px 0 0;background:#f8faff}
.post-hero-image img{width:100%;border-radius:12px;max-height:480px;object-fit:cover}
.post-content{padding:64px 0}
.post-body{max-width:780px;margin:0 auto;font-size:1.05rem;line-height:1.8;color:#333;word-break:break-word;overflow-wrap:break-word;overflow-x:hidden;min-width:0}
.post-body h2,.post-body h3{margin:2em 0 .75em}
.post-body p{margin-bottom:1.2em}
.post-body img{max-width:100%;border-radius:8px;margin:1em 0}
.post-body ul,.post-body ol{margin:1em 0 1em 1.5em}
.post-body li{margin-bottom:.5em}
.post-share{max-width:780px;margin:48px auto 0;padding-top:32px;border-top:1px solid #e5e7eb;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.post-share span{font-weight:600;color:#555}
.post-share a{color:#00AEEF;text-decoration:none;font-size:.9rem}
.post-share a:hover{text-decoration:underline}
.related-posts{padding:64px 0;background:#f9fafb}
.related-posts h2{text-align:center;margin-bottom:40px;font-size:1.6rem}

/* ── Dark Theme (Blog Listing + Single Post) ─────────────────── */
body.dark-page { background: #090e1a; }

/* Blog hero */
.blog-hero { position:relative;overflow:hidden; }
.blog-hero__glow { position:absolute;width:700px;height:400px;background:radial-gradient(ellipse,rgba(0,174,239,0.08) 0%,transparent 70%);top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none; }
body.dark-page .blog-hero {
  background: #090e1a !important;
  padding: 100px 0 60px;
  text-align: center;
}
body.dark-page .blog-hero h1 { color:#fff; }
body.dark-page .blog-hero p { color:rgba(255,255,255,0.55); }
body.dark-page .hero-badge { background:rgba(0,174,239,0.1);color:var(--primary);border:1px solid rgba(0,174,239,0.15); }

/* Category filters */
.blog-filters { background:#0d1117;border-bottom:1px solid rgba(255,255,255,0.06);padding:16px 0; }
.filter-pills { display:flex;gap:8px;flex-wrap:wrap;align-items:center; }
.filter-pill { font-size:0.8rem;font-weight:500;padding:7px 16px;border-radius:100px;text-decoration:none;color:rgba(255,255,255,0.5);border:1px solid rgba(255,255,255,0.08);transition:.2s; }
.filter-pill span { color:rgba(255,255,255,0.3);font-size:0.72rem; }
.filter-pill:hover { border-color:rgba(0,174,239,0.3);color:var(--primary); }
.filter-pill.active { background:rgba(0,174,239,0.12);border-color:rgba(0,174,239,0.3);color:var(--primary); }

/* Blog section */
body.dark-page .blog-section { background:#090e1a !important; }
body.dark-page .blog-card {
  background: rgba(255,255,255,0.04) !important;
  border-color: rgba(255,255,255,0.07) !important;
}
body.dark-page .blog-card:hover {
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(0,174,239,0.2) !important;
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
body.dark-page .blog-title a { color:#fff !important; }
body.dark-page .blog-title a:hover { color:var(--primary) !important; }
body.dark-page .blog-date { color:rgba(255,255,255,0.35) !important; }
body.dark-page .blog-excerpt { color:rgba(255,255,255,0.5) !important; }
body.dark-page .blog-thumb-placeholder { background:linear-gradient(135deg,rgba(0,174,239,0.12),rgba(168,85,247,0.08)) !important; }

/* Blog meta row */
.blog-meta { display:flex;align-items:center;gap:10px;margin-bottom:8px;flex-wrap:wrap; }
.blog-read-time { font-size:11px;color:rgba(255,255,255,0.3);text-transform:uppercase;letter-spacing:.5px; }

/* Category badge on card */
.blog-cat-badge { position:absolute;top:12px;left:12px;font-size:11px;font-weight:600;padding:3px 10px;border-radius:100px;background:rgba(0,174,239,0.85);color:#fff;backdrop-filter:blur(4px); }
.blog-thumb { position:relative; }

/* Blog empty */
body.dark-page .blog-empty { color:rgba(255,255,255,0.4); }
body.dark-page .blog-empty h3 { color:rgba(255,255,255,0.7); }

/* Pagination */
body.dark-page .page-link { background:rgba(255,255,255,0.05);border-color:rgba(255,255,255,0.1);color:rgba(255,255,255,0.6); }
body.dark-page .page-link.active,
body.dark-page .page-link:hover { background:var(--primary);border-color:var(--primary);color:#fff; }

/* ── Single Post ─────────────────────────────────────────── */
.post-hero { padding:100px 0 60px;position:relative;overflow:hidden;text-align:center; }
.post-hero__glow { position:absolute;width:700px;height:400px;background:radial-gradient(ellipse,rgba(0,174,239,0.08) 0%,transparent 70%);top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none; }
body.dark-page .post-hero { background:#090e1a; }

.post-hero__meta { display:flex;align-items:center;justify-content:center;gap:12px;margin-bottom:24px;flex-wrap:wrap; }
.post-back { font-size:0.83rem;color:rgba(255,255,255,0.45);text-decoration:none;transition:.2s; }
.post-back:hover { color:var(--primary); }
.post-category { font-size:0.72rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--primary);background:rgba(0,174,239,0.1);border:1px solid rgba(0,174,239,0.2);padding:4px 12px;border-radius:100px; }

.post-title { font-size:clamp(1.9rem,5vw,3.2rem);font-weight:800;line-height:1.15;color:#fff;max-width:800px;margin:0 auto 16px;letter-spacing:-.02em; }
.post-lead { font-size:1.1rem;color:rgba(255,255,255,0.6);max-width:680px;margin:0 auto; }
.post-info { display:flex;align-items:center;justify-content:center;gap:8px;margin-top:24px;flex-wrap:wrap;font-size:0.85rem;color:rgba(255,255,255,0.4); }
.post-date { color:rgba(255,255,255,0.5); }
.post-divider { opacity:.3; }
.post-read-time,.post-cat-label { color:rgba(255,255,255,0.4); }

.post-featured-img { padding:32px 0 0;background:#090e1a; }

/* Post layout */
.post-content-wrap { padding:60px 0 80px;background:#0d1117; }
.post-layout { display:grid;grid-template-columns:1fr 280px;gap:48px;align-items:start; }

/* Post body typography */
.post-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif; /* Override Avoner — blog content needs proper lowercase */
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.72);
  max-width: 100%;
  /* Prevent long URLs / words from overflowing the screen */
  word-break: break-word;
  overflow-wrap: break-word;
  word-wrap: break-word;
  overflow-x: hidden;
  min-width: 0; /* fixes flex/grid children overflow */
}
.post-body h2 { font-size:1.6rem;font-weight:700;color:#fff;margin:2.5em 0 .75em;line-height:1.25; }
.post-body h3 { font-size:1.2rem;font-weight:700;color:#fff;margin:2em 0 .6em; }
.post-body h4 { font-size:1rem;font-weight:700;color:#fff;margin:1.5em 0 .5em; }
.post-body p { margin-bottom:1.4em;color:rgba(255,255,255,0.7); }
.post-body a { color:var(--primary);text-decoration:underline;text-underline-offset:3px; }
.post-body img { max-width:100%;border-radius:10px;margin:1.5em 0;display:block; }
.post-body ul,.post-body ol { margin:1em 0 1.5em 1.5em; }
.post-body li { margin-bottom:.6em;color:rgba(255,255,255,0.65); }
.post-body blockquote { border-left:3px solid var(--primary);padding:16px 24px;margin:2em 0;background:rgba(0,174,239,0.05);border-radius:0 8px 8px 0;font-style:italic;color:rgba(255,255,255,0.65); }
.post-body pre { background:rgba(255,255,255,0.05);border:1px solid rgba(255,255,255,0.08);border-radius:8px;padding:20px;overflow-x:auto;font-size:.88rem;margin:1.5em 0; }
.post-body code { background:rgba(255,255,255,0.08);padding:2px 6px;border-radius:4px;font-size:.88em;color:#e2e8f0; }
.post-body pre code { background:none;padding:0;font-size:.88rem; }
.post-body hr { border:none;border-top:1px solid rgba(255,255,255,0.08);margin:2.5em 0; }
.post-body strong { color:#fff;font-weight:600; }

/* Sidebar */
.post-sidebar { position:sticky;top:80px; }
.post-share-box { background:rgba(255,255,255,0.04);border:1px solid rgba(255,255,255,0.08);border-radius:12px;padding:20px;margin-bottom:16px; }
.post-share-title { font-size:0.72rem;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,0.4);margin-bottom:14px; }
.post-share-btns { display:flex;flex-direction:column;gap:8px; }
.share-btn { display:flex;align-items:center;gap:8px;padding:9px 14px;border-radius:8px;font-size:0.83rem;font-weight:500;text-decoration:none;transition:.2s;cursor:pointer;border:none;width:100%;text-align:left; }
.share-btn--x { background:rgba(255,255,255,0.05);color:rgba(255,255,255,0.7); }
.share-btn--x:hover { background:rgba(255,255,255,0.1);color:#fff; }
.share-btn--li { background:rgba(0,119,181,0.1);color:#0a8ab0; }
.share-btn--li:hover { background:rgba(0,119,181,0.2);color:#38bdf8; }
.share-btn--wa { background:rgba(37,211,102,0.1);color:#25d366; }
.share-btn--wa:hover { background:rgba(37,211,102,0.2); }
.share-btn--copy { background:rgba(255,255,255,0.05);color:rgba(255,255,255,0.5);font-family:inherit; }
.share-btn--copy:hover { background:rgba(255,255,255,0.09);color:#fff; }

.post-cta-box { background:linear-gradient(135deg,rgba(0,174,239,0.1),rgba(168,85,247,0.08));border:1px solid rgba(0,174,239,0.2);border-radius:12px;padding:24px;text-align:center; }
.post-cta-icon { font-size:2rem;margin-bottom:12px; }
.post-cta-box h4 { font-size:1rem;font-weight:700;color:#fff;margin-bottom:10px; }
.post-cta-box p { font-size:0.83rem;color:rgba(255,255,255,0.5);line-height:1.6;margin-bottom:16px; }

/* Related posts */
body.dark-page .related-posts { background:#090e1a;border-top:1px solid rgba(255,255,255,0.06);padding:64px 0; }
body.dark-page .related-posts h2 { color:#fff; }
body.dark-page .related-posts p { color:rgba(255,255,255,0.5); }
.blog-grid-3 { grid-template-columns:repeat(auto-fill,minmax(260px,1fr)); }

/* Mobile */
@media (max-width:900px) {
  .post-layout {
    grid-template-columns: 1fr;
    min-width: 0; /* prevents grid from overflowing container */
  }
  .post-sidebar { position:static; }
  .post-share-btns { flex-direction:row;flex-wrap:wrap; }
  .share-btn { width:auto;flex:1;min-width:120px;justify-content:center; }

  /* Force ALL post content children to respect viewport width */
  .post-body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  .post-body * {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  /* Long URLs inside links must break at character level */
  .post-body a {
    word-break: break-all;
  }
  /* Code blocks scroll within their box, don't push page wide */
  .post-body pre {
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 100%;
  }
  /* List items full width */
  .post-body li {
    word-break: break-word;
    overflow-wrap: break-word;
  }
}
@media (max-width:600px) {
  .post-title { font-size:1.5rem; }
  .post-content-wrap { padding:36px 0 60px; }
  .filter-pills { gap:6px; }
  .filter-pill { font-size:0.75rem;padding:5px 12px; }
  .blog-grid { grid-template-columns:1fr; }
}
