/* ════════════════════════════════════════════
   BLOG LAYOUT — Main + Sidebar
════════════════════════════════════════════ */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

.blog-main { min-width: 0; }

/* ── Posts Grid v2 ── */
.blog-grid-v2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* ── Card v2 ── */
.blog-card-v2 {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(20, 98, 250, 0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 6px 20px rgba(20, 98, 250, 0.05);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.blog-card-v2:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(20, 98, 250, 0.12);
}

.blog-card-v2__thumb {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #eef3ff;
  flex-shrink: 0;
}

.blog-card-v2__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.blog-card-v2:hover .blog-card-v2__thumb img {
  transform: scale(1.06);
}

.blog-card-v2__thumb-empty {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef3ff, #e0eaff);
  font-size: 2rem;
  color: rgba(20, 98, 250, 0.2);
}

.blog-card-v2__cat {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(20, 98, 250, 0.9);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.blog-card-v2__body {
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.blog-card-v2__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.76rem;
  color: #8a96b0;
}

.blog-card-v2__meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.blog-card-v2__meta i {
  color: #1462fa;
  font-size: 0.68rem;
}

.blog-card-v2__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.45;
  color: #0a1628;
}

.blog-card-v2__title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-v2__title a:hover { color: #1462fa; }

.blog-card-v2__excerpt {
  font-size: 0.84rem;
  color: #5a6a85;
  line-height: 1.65;
  margin: 0;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-v2__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #1462fa;
  text-decoration: none;
  margin-top: auto;
  transition: gap 0.2s;
}

.blog-card-v2__link:hover { gap: 10px; color: #1462fa; }
.blog-card-v2__link i { font-size: 0.68rem; }

/* ════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════ */

.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 100px;
}

.sidebar-widget {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(20, 98, 250, 0.07);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  padding: 22px 20px;
}

.sidebar-widget__title {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0a1628;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(20, 98, 250, 0.07);
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-widget__title i { color: #1462fa; font-size: 0.85rem; }

/* Search */
.sidebar-search {
  display: flex;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(20, 98, 250, 0.12);
}

.sidebar-search input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-size: 0.86rem;
  font-family: inherit;
  direction: rtl;
  background: #f8faff;
  color: #0a1628;
}

.sidebar-search input[type="search"]::placeholder { color: #b0b8cc; }

.sidebar-search button {
  background: #1462fa;
  border: none;
  padding: 0 14px;
  color: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-search button:hover { background: #0f4fd0; }

/* Popular posts */
.sidebar-posts {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-post {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-post__num {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(20, 98, 250, 0.08);
  color: #1462fa;
  font-size: 0.72rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-post__thumb {
  width: 56px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}

.sidebar-post__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.sidebar-post:hover .sidebar-post__thumb img { transform: scale(1.08); }

.sidebar-post__info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.sidebar-post__title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0a1628;
  text-decoration: none;
  line-height: 1.35;
  transition: color 0.2s;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sidebar-post__title:hover { color: #1462fa; }

.sidebar-post__date {
  font-size: 0.72rem;
  color: #8a96b0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-post__date i { color: #1462fa; font-size: 0.65rem; }

/* Categories */
.sidebar-cats {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-cats a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: #374151;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.sidebar-cats a:hover {
  background: rgba(20, 98, 250, 0.06);
  color: #1462fa;
}

.sidebar-cats__count {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: #1462fa;
  padding: 2px 8px;
  border-radius: 20px;
  min-width: 24px;
  text-align: center;
}

/* CTA Widget */
.sidebar-cta {
  background: linear-gradient(135deg, #0a1628 0%, #0f2040 100%);
  border-color: rgba(20, 98, 250, 0.2);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.sidebar-cta__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(20, 98, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #4d8fff;
}

.sidebar-cta h4 { font-size: 0.95rem; font-weight: 800; color: #fff; margin: 0; }
.sidebar-cta p { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin: 0; line-height: 1.5; }

.sidebar-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  background: linear-gradient(135deg, #1462fa, #1a6fff);
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 14px rgba(20, 98, 250, 0.35);
  width: 100%;
}

.sidebar-cta__btn:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .blog-layout { grid-template-columns: 1fr 260px; gap: 28px; }
}

@media (max-width: 768px) {
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .blog-grid-v2 { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .blog-grid-v2 { gap: 16px; }
}

/* ════════════════════════════════════════════
   SEARCH PAGE
════════════════════════════════════════════ */

.search-page-bar {
  margin-bottom: 32px;
}

.search-page-form {
  display: flex;
  gap: 0;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(20, 98, 250, 0.15);
  box-shadow: 0 4px 16px rgba(20, 98, 250, 0.08);
  background: #ffffff;
}

.search-page-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 16px;
  background: #ffffff;
}

.search-page-input-wrap i {
  color: #1462fa;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.search-page-input-wrap input[type="search"] {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 0;
  font-size: 0.95rem;
  font-family: inherit;
  direction: rtl;
  background: transparent;
  color: #0a1628;
}

.search-page-input-wrap input[type="search"]::placeholder {
  color: #b0b8cc;
}

.search-page-form button {
  background: linear-gradient(135deg, #1462fa, #1a6fff);
  border: none;
  padding: 0 28px;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.search-page-form button:hover { opacity: 0.9; }

/* Results grid - same as blog-grid-v2 */
.search-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 640px) {
  .search-results-grid { grid-template-columns: 1fr; }
  .search-page-form button { padding: 0 18px; font-size: 0.86rem; }
}
