/* ============================================================
   VORTEX BLOG LAYOUTS - Magazine, Minimal, Sidebar
   Loaded only on blog, archive and search views.
   ============================================================ */

.vortex-blog-header {
  background: var(--vx-soft, #f6f7fb);
  border-bottom: 1px solid var(--vx-line, #e5e7eb);
  margin-bottom: clamp(1.5rem, 4vw, 3rem);
  padding-block: clamp(2rem, 5vw, 3.5rem);
}

.vortex-blog-header h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  margin-bottom: 0.5rem;
}

.vortex-blog-header p {
  color: #4b5563;
  font-size: 1.1rem;
  margin: 0;
  max-width: 44rem;
}

.vortex-blog-main {
  padding-bottom: clamp(2rem, 6vw, 4rem);
}

/* ---------- Shared post card ---------- */
.vortex-blog-post {
  background: #fff;
  border: 1px solid var(--vx-line, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
}

.vortex-blog-featured-image {
  aspect-ratio: 16 / 9;
  background: var(--vx-soft, #f0f0f0);
  overflow: hidden;
}

.vortex-blog-featured-image a,
.vortex-blog-featured-image img {
  display: block;
  height: 100%;
  width: 100%;
}

.vortex-blog-featured-image img {
  object-fit: cover;
}

.vortex-blog-content {
  padding: clamp(1.1rem, 2.5vw, 1.6rem);
}

.vortex-blog-meta {
  color: #4b5563;
  display: flex;
  flex-wrap: wrap;
  font-size: 0.8125rem;
  gap: 0.25rem 1rem;
  margin-bottom: 0.75rem;
}

.vortex-blog-category a {
  color: var(--vortex-primary);
  font-weight: 600;
}

.vortex-blog-title {
  color: #1f2937;
  font-size: clamp(1.2rem, 2vw, 1.4rem);
  line-height: 1.3;
  margin: 0 0 0.75rem;
}

.vortex-blog-title a {
  color: inherit;
}

.vortex-blog-title a:hover,
.vortex-blog-title a:focus-visible {
  color: var(--vortex-primary);
}

.vortex-blog-excerpt {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 1rem;
}

.vortex-blog-excerpt p {
  margin: 0;
}

.vortex-blog-read-more {
  color: var(--vortex-primary);
  font-weight: 600;
}

.vortex-blog-read-more:hover {
  text-decoration: underline;
}

.vortex-blog-post a:focus-visible,
.vortex-blog-sidebar a:focus-visible,
.vortex-blog-pagination a:focus-visible {
  box-shadow: 0 0 0 2px #fff;
  outline: 3px solid #1f2937;
  outline-offset: 2px;
}

/* ---------- Magazine ---------- */
.vortex-blog-grid-magazine {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  grid-template-columns: 1fr;
  margin-top: clamp(1rem, 2.5vw, 1.75rem);
}

.vortex-blog-featured-post {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 1fr;
}

.vortex-blog-featured-post .vortex-blog-featured-image {
  aspect-ratio: 16 / 9;
}

.vortex-blog-featured-post .vortex-blog-title {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.vortex-blog-featured-post .vortex-blog-content {
  align-self: center;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

@media (min-width: 720px) {
  .vortex-blog-grid-magazine {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .vortex-blog-featured-post {
    grid-template-columns: 1.2fr 1fr;
  }

  .vortex-blog-featured-post .vortex-blog-featured-image {
    aspect-ratio: auto;
    min-height: 380px;
  }
}

@media (min-width: 1000px) {
  .vortex-blog-grid-magazine {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Minimal ---------- */
.vortex-blog-minimal-wrap {
  margin-inline: auto;
  max-width: 760px;
}

.vortex-blog-grid-minimal {
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vw, 3.25rem);
}

.vortex-blog-post-minimal {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--vx-line, #e5e7eb);
  border-radius: 0;
  padding-bottom: clamp(2rem, 5vw, 3.25rem);
}

.vortex-blog-post-minimal:last-child {
  border-bottom: 0;
}

.vortex-blog-post-minimal .vortex-blog-featured-image {
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.vortex-blog-post-minimal .vortex-blog-content {
  padding: 0;
}

.vortex-blog-post-minimal .vortex-blog-title {
  font-size: clamp(1.5rem, 3.4vw, 2rem);
}

.vortex-blog-post-minimal .vortex-blog-excerpt {
  font-size: 1.05rem;
}

/* ---------- Sidebar ---------- */
.vortex-blog-with-sidebar {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .vortex-blog-with-sidebar {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

.vortex-blog-grid-sidebar {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 2.5vw, 1.75rem);
}

@media (min-width: 640px) {
  .vortex-blog-post-sidebar.has-featured-image {
    display: grid;
    grid-template-columns: 260px 1fr;
  }

  .vortex-blog-post-sidebar .vortex-blog-featured-image {
    aspect-ratio: auto;
    height: 100%;
    min-height: 200px;
  }
}

.vortex-blog-sidebar {
  align-self: start;
  background: var(--vx-soft, #f9fafb);
  border-radius: 12px;
  padding: 1.5rem;
}

@media (min-width: 960px) {
  .vortex-blog-sidebar {
    position: sticky;
    top: 5.5rem;
  }
}

.vortex-blog-sidebar h2 {
  color: #1f2937;
  font-size: 1rem;
  margin: 0 0 0.9rem;
}

.vortex-blog-sidebar-widget {
  margin-bottom: 1.75rem;
}

.vortex-blog-sidebar-widget:last-child {
  margin-bottom: 0;
}

.vortex-blog-sidebar-widget p {
  color: #4b5563;
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.vortex-blog-sidebar-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.vortex-blog-sidebar-list li {
  border-bottom: 1px solid var(--vx-line, #e5e7eb);
  padding: 0.6rem 0;
}

.vortex-blog-sidebar-list li:last-child {
  border-bottom: 0;
}

.vortex-blog-sidebar-list a {
  font-weight: 500;
}

.vortex-blog-sidebar-count {
  color: #4b5563;
  font-size: 0.8rem;
}

.vortex-blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vortex-blog-tags a {
  background: #fff;
  border: 1px solid var(--vx-line, #e5e7eb);
  border-radius: 999px;
  color: #374151;
  font-size: 0.8125rem;
  padding: 0.3rem 0.8rem;
}

.vortex-blog-tags a:hover {
  border-color: var(--vortex-primary);
  color: var(--vortex-primary);
}

/* ---------- Pagination ---------- */
.vortex-blog-pagination {
  border-top: 1px solid var(--vx-line, #e5e7eb);
  margin-top: 2.5rem;
  padding-top: 2rem;
}

.vortex-blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.vortex-blog-pagination .page-numbers {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #374151;
  min-height: 44px;
  min-width: 44px;
  padding: 0.6rem 0.9rem;
  text-align: center;
}

.vortex-blog-pagination a.page-numbers:hover {
  background: var(--vortex-primary);
  border-color: var(--vortex-primary);
  color: #fff;
}

.vortex-blog-pagination .page-numbers.current {
  background: var(--vortex-primary);
  border-color: var(--vortex-primary);
  color: #fff;
}

@media (prefers-reduced-motion: no-preference) {
  .vortex-blog-post {
    transition: box-shadow 0.2s ease;
  }

  .vortex-blog-post:hover {
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.1);
  }
}
