/* Testeryiz blog: shared cards, archive pages and article typography */

.post-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden; border-radius: 17px;
  background: linear-gradient(145deg, rgba(7, 27, 46, .94), rgba(3, 15, 27, .94));
  border: 1px solid var(--line); transition: transform .25s, border-color .25s, box-shadow .25s;
}
.post-card:hover { transform: translateY(-5px); border-color: rgba(35, 190, 255, .45); box-shadow: 0 22px 50px rgba(0, 0, 0, .32); }
.post-cover { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: linear-gradient(135deg, #0a2f4d, #06121f); }
.post-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.post-card:hover .post-cover img { transform: scale(1.04); }
.post-cover-fallback {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 46px; font-weight: 900; letter-spacing: -.05em; color: rgba(19, 169, 255, .38);
  background: radial-gradient(circle at 30% 20%, rgba(19, 169, 255, .22), transparent 60%);
}
.post-body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 11px; color: #7e93a7; }
.post-category { color: #43c9ff; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.post-body h3 { margin: 0; font-size: 17px; line-height: 1.36; letter-spacing: -.02em; }
.post-body h3 a:hover { color: #7fe0ff; }
.post-body p { margin: 0; font-size: 13px; color: #879caf; }
.post-link { margin-top: auto; padding-top: 6px; font-size: 12px; font-weight: 800; color: #43c9ff; }
.post-link:hover { color: #9beeff; }
.blog-more { margin-top: 30px; text-align: center; }

/* Blog archive */
.blog-hero { padding: 72px 0 34px; text-align: center; }
.blog-hero h1 { margin: 16px 0 12px; font-size: clamp(34px, 4.4vw, 52px); line-height: 1.08; letter-spacing: -.05em; }
.blog-hero h1 span { background: linear-gradient(90deg, #1da8ff, #20d7f2, #45e36d); -webkit-background-clip: text; background-clip: text; color: transparent; }
.blog-hero p { max-width: 620px; margin: 0 auto; color: #93a8bc; font-size: 15px; }
.blog-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 34px; align-items: start; }
.blog-main { display: grid; gap: 22px; }
.blog-side { display: grid; gap: 18px; position: sticky; top: 96px; }
.side-card {
  background: linear-gradient(145deg, rgba(7, 27, 46, .94), rgba(3, 15, 27, .94));
  border: 1px solid var(--line); border-radius: 16px; padding: 20px;
}
.side-card h3 { margin: 0 0 14px; font-size: 12px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: #7e93a7; }
.side-search { display: flex; gap: 8px; }
.side-search input {
  flex: 1; min-width: 0; padding: 10px 12px; border-radius: 9px; font-family: inherit; font-size: 13px;
  color: #f4f8ff; background: rgba(3, 16, 28, .9); border: 1px solid rgba(255, 255, 255, .1);
}
.side-search input:focus { outline: none; border-color: rgba(21, 213, 255, .6); box-shadow: 0 0 0 3px rgba(19, 169, 255, .14); }
.side-search button {
  padding: 10px 14px; border-radius: 9px; border: 1px solid #2c9cd2; cursor: pointer;
  background: rgba(4, 20, 34, .8); color: #dbe9f6; font-family: inherit; font-size: 12px; font-weight: 800;
}
.side-search button:hover { border-color: #55d5ff; color: #fff; }
.cat-list { display: grid; gap: 8px; }
.cat-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: #a9b9c8; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.cat-list a:last-child { border-bottom: 0; }
.cat-list a:hover { color: #7fe0ff; }
.cat-list span { font-size: 11px; color: #6f8699; }
.mini-post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.mini-post:last-child { border-bottom: 0; padding-bottom: 0; }
.mini-post .mini-thumb { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg, #0a2f4d, #06121f); display: grid; place-items: center; font-weight: 900; color: rgba(19, 169, 255, .5); }
.mini-post .mini-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mini-post b { display: block; font-size: 12.5px; line-height: 1.4; color: #e4eefa; }
.mini-post small { font-size: 11px; color: #6f8699; }
.mini-post:hover b { color: #7fe0ff; }
.side-cta { background: linear-gradient(150deg, rgba(6, 30, 50, .96), rgba(8, 44, 71, .96)); border-color: rgba(22, 183, 255, .45); }
.side-cta p { margin: 0 0 14px; font-size: 13px; color: #a9b9c8; }
.side-cta .btn { width: 100%; }

/* Featured article on the archive page */
.featured-post { display: grid; grid-template-columns: 1.05fr 1fr; overflow: hidden; border-radius: 20px; border: 1px solid rgba(22, 183, 255, .4); background: linear-gradient(140deg, rgba(7, 32, 54, .96), rgba(3, 15, 27, .96)); }
.featured-post .post-cover { aspect-ratio: auto; height: 100%; min-height: 250px; }
.featured-post .post-body { padding: 30px; gap: 12px; justify-content: center; }
.featured-post .post-body h3 { font-size: 25px; line-height: 1.24; }
.featured-post .post-body p { font-size: 14px; }
.featured-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(69, 227, 109, .12); border: 1px solid rgba(69, 227, 109, .32); color: #6ff08d; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }

/* Article page */
.article-hero { padding: 64px 0 30px; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #6f8699; }
.breadcrumb a { color: #9cafc3; }
.breadcrumb a:hover { color: #7fe0ff; }
.article-hero h1 { max-width: 880px; margin: 18px 0 16px; font-size: clamp(30px, 4vw, 46px); line-height: 1.12; letter-spacing: -.045em; }
.article-lead { max-width: 760px; color: #9fb2c5; font-size: 16px; margin: 0; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 24px; font-size: 12px; color: #7e93a7; }
.article-meta .author-chip { display: inline-flex; align-items: center; gap: 9px; color: #dbe9f6; font-weight: 600; }
.article-meta .author-chip i { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 800; background: linear-gradient(135deg, #174c78, #25c9e8); color: #fff; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; }
.article { min-width: 0; }
.article-cover { margin: 0 0 30px; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.article-cover img { display: block; width: 100%; height: auto; }
.article-side { display: grid; gap: 18px; position: sticky; top: 96px; }
.prose { color: #c3d2e0; font-size: 15.5px; line-height: 1.78; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 40px 0 14px; font-size: 27px; line-height: 1.25; letter-spacing: -.035em; color: #fff; }
.prose h3 { margin: 30px 0 12px; font-size: 20px; color: #fff; }
.prose h4 { margin: 24px 0 10px; font-size: 16px; color: #fff; }
.prose p { margin: 0 0 18px; }
.prose a { color: #55d5ff; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: #9beeff; }
.prose ul, .prose ol { margin: 0 0 20px; padding-left: 22px; display: grid; gap: 9px; }
.prose li::marker { color: #45e36d; font-weight: 700; }
.prose blockquote { margin: 26px 0; padding: 16px 20px; border-left: 3px solid #15b7ff; border-radius: 0 12px 12px 0; background: rgba(9, 38, 62, .6); color: #a9b9c8; }
.prose blockquote p:last-child { margin: 0; }
.prose code { padding: 2px 6px; border-radius: 6px; background: rgba(19, 169, 255, .13); font-size: .9em; }
.prose pre { margin: 0 0 22px; padding: 16px 18px; overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); background: #03101d; }
.prose pre code { padding: 0; background: none; }
.prose img { max-width: 100%; height: auto; margin: 8px 0 22px; border-radius: 14px; border: 1px solid var(--line); }
.prose table { width: 100%; margin: 0 0 22px; border-collapse: collapse; font-size: 13.5px; }
.prose th, .prose td { padding: 10px 13px; border: 1px solid var(--line); text-align: left; }
.prose th { background: rgba(19, 169, 255, .09); color: #fff; font-weight: 700; }
.prose hr { margin: 34px 0; border: 0; border-top: 1px solid var(--line); }

.article-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 34px; padding-top: 24px; border-top: 1px solid var(--line); }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill { padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .1); background: rgba(4, 20, 34, .6); font-size: 11px; color: #9cafc3; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 12px; color: #6f8699; }
.share a, .share button {
  padding: 7px 12px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(4, 20, 34, .65); color: #c8d5e5; font-size: 11px; font-weight: 700;
  font-family: inherit; cursor: pointer;
}
.share a:hover, .share button:hover { border-color: rgba(19, 169, 255, .5); color: #fff; }
.author-box { display: flex; gap: 16px; margin-top: 28px; padding: 22px; border-radius: 16px; border: 1px solid var(--line); background: rgba(5, 22, 38, .8); }
.author-box .author-avatar { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 50%; display: grid; place-items: center; font-size: 18px; font-weight: 900; background: linear-gradient(135deg, #174c78, #25c9e8); color: #fff; }
.author-box b { display: block; font-size: 14px; }
.author-box small { color: #6f8699; font-size: 11px; }
.author-box p { margin: 8px 0 0; font-size: 13px; color: #93a8bc; }

/* Responsive */
.blog-result-note { margin: 0 0 6px; font-size: 13px; color: #93a8bc; }
.blog-result-note a { color: #55d5ff; text-decoration: underline; }

@media (max-width: 980px) {
  .blog-layout, .article-layout { grid-template-columns: 1fr; }
  .blog-side, .article-side { position: static; }
  .post-grid { grid-template-columns: 1fr 1fr; }
  .featured-post { grid-template-columns: 1fr; }
  .featured-post .post-cover { height: 220px; aspect-ratio: auto; min-height: 0; }
  .featured-post .post-cover img { height: 100%; object-fit: cover; }
}
@media (max-width: 700px) {
  .post-grid { grid-template-columns: 1fr; }
  .blog-hero { padding: 48px 0 24px; }
  .article-hero { padding: 40px 0 22px; }
  .featured-post .post-body { padding: 22px; }
  .prose { font-size: 15px; }
}
