/**
 * Vender Milhas Blog - Category & Archive Layout Stylesheet
 *
 * @package Vender_Milhas_Blog
 */

/* ==========================================================================
   1. Category Hero (Opção A - Azul Institucional)
   ========================================================================== */
.vm-category-hero {
  background: var(--vm-grad-hero, linear-gradient(158deg, #062E56 0%, #044E8F 55%, #285FA2 100%));
  padding: 38px 0 44px;
  position: relative;
  overflow: hidden;
}

.vm-category-hero::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143, 194, 240, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.vm-category-hero .vm-breadcrumbs {
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--vm-blue-lt, #8FC2F0);
}

.vm-category-hero .vm-breadcrumbs a {
  color: #BFDBFE;
  text-decoration: none;
  transition: color 0.15s ease;
}

.vm-category-hero .vm-breadcrumbs a:hover {
  color: #FFFFFF;
  text-decoration: underline;
}

.vm-category-hero .vm-breadcrumbs-sep {
  color: #60A5FA;
  margin: 0 4px;
}

.vm-category-hero .vm-breadcrumbs .current {
  color: #FFFFFF;
  font-weight: 700;
}

.vm-category-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.vm-category-hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0FA45E;
  color: #062E56;
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 3px 9px 1px;
  border-radius: 6px;
  line-height: 1.1;
  box-shadow: 0 2px 6px rgba(180, 255, 83, 0.35);
}

.vm-category-count-badge {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  line-height: 1.2;
}

.vm-category-hero-title {
  font-family: 'Zain', system-ui, sans-serif;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 900;
  color: #FFFFFF;
  margin: 0 0 8px 0;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.vm-category-hero-desc {
  font-size: 15px;
  color: #CBDBEC;
  margin: 0;
  line-height: 1.5;
  max-width: 680px;
}

/* 1.1 Author Hero Specifics */
.vm-author-hero-flex {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.vm-author-hero-avatar {
  width: 92px;
  height: 92px;
  min-width: 92px;
  border-radius: 50%;
  overflow: hidden;
  border: 3.5px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  background: #062E56;
}

.vm-author-hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vm-author-hero-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.vm-author-hero-title {
  font-family: 'Zain', system-ui, sans-serif;
  font-size: clamp(30px, 4.5vw, 42px);
  font-weight: 900;
  color: #FFFFFF;
  margin: 0 0 4px 0;
  line-height: 1.08;
  letter-spacing: -0.015em;
}

.vm-author-hero-bio {
  font-size: 15px;
  color: #CBDBEC;
  margin: 0;
  line-height: 1.5;
  max-width: 640px;
}

@media (max-width: 640px) {
  .vm-author-hero-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .vm-author-hero-avatar {
    width: 74px;
    height: 74px;
    min-width: 74px;
  }
}

/* ==========================================================================
   2. Layout Principal (Artigos em 2 Colunas + Sidebar Lateral)
   ========================================================================== */
.vm-category-layout {
  padding: 40px 0 60px;
  background: #F8FAFC;
}

.vm-category-grid-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 40px;
  align-items: start;
}

.vm-category-main {
  min-width: 0;
}

.vm-category-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 36px;
}

.vm-category-posts-grid .vm-card {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.vm-category-posts-grid .vm-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.vm-category-posts-grid .vm-card-footer {
  margin-top: auto;
}

/* Sidebar na Categoria */
.vm-category-sidebar {
  width: 300px;
  position: sticky;
  top: 88px;
}

.vm-category-sidebar .vm-sidebar-sticky-inner {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Calculadora na Página de Categoria (Limpa) */
.vm-category-calc-wrap {
  margin-top: 48px;
  padding-top: 36px;
  border-top: 1.5px solid #E2E8F0;
}

.vm-category-calc-wrap .vmc-horizontal-wrapper {
  padding: 0;
  max-width: 100%;
}

.vm-category-calc-wrap .vmc-h-card {
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(6, 46, 86, 0.06);
  background: #FFFFFF;
}

/* Empty State */
.vm-empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 16px rgba(6, 46, 86, 0.04);
}

.vm-empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.vm-empty-state h3 {
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 26px;
  font-weight: 900;
  color: #062E56;
  margin: 0 0 8px;
}

.vm-empty-state p {
  color: #64748B;
  font-size: 15px;
  margin: 0 0 20px;
}

/* ==========================================================================
   3. Estilos Compartilhados do Sidebar (Quote Card + Popular + Banner)
   ========================================================================== */
.vm-quote-card {
  border-radius: 16px;
  padding: 24px 20px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 10px 28px rgba(6, 46, 86, 0.08);
}

.vm-quote-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0057FF;
  background: #EFF6FF;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.vm-badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  animation: vm-pulse 2s infinite;
}

@keyframes vm-pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.vm-quote-card-title {
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 24px;
  font-weight: 900;
  color: #062E56;
  margin: 0 0 6px 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.vm-quote-card-desc {
  font-size: 13.5px;
  color: #64748B;
  margin: 0 0 16px 0;
  line-height: 1.45;
}

.vm-quote-card-programs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.vm-quote-prog-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 10px 4px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.vm-quote-prog-item:hover {
  background: #FFFFFF;
  border-color: #0057FF;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 87, 255, 0.15);
}

.vm-quote-prog-item img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.vm-quote-prog-item span {
  font-size: 11.5px;
  font-weight: 700;
  color: #062E56;
  line-height: 1.1;
  text-align: center;
}

.vm-quote-card-highlight {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #062E56;
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.vm-quote-card-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 13px 18px;
  background: #0FA45E;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 800;
  border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 164, 94, 0.35);
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.vm-quote-card-btn:hover {
  background: #0A6E3D;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 164, 94, 0.45);
}

.vm-quote-card-safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11.5px;
  color: #94A3B8;
  margin-top: 10px;
}

/* Popular Widget no Sidebar */
.vm-sidebar-popular {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 16px;
  padding: 22px 18px;
  margin-top: 18px;
  box-shadow: 0 10px 26px rgba(6, 46, 86, 0.06);
}

.vm-sidebar-popular-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #F1F5F9;
}

.vm-popular-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0FA45E;
  color: #062E56;
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.05em;
  padding: 3px 8px 1px;
  border-radius: 6px;
  line-height: 1.1;
  box-shadow: 0 2px 6px rgba(180, 255, 83, 0.4);
}

.vm-sidebar-popular-title {
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: #062E56;
  margin: 0;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.vm-sidebar-popular-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vm-popular-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 11px;
  border-bottom: 1px solid #F1F5F9;
}

.vm-popular-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.vm-popular-thumb-wrap {
  position: relative;
  width: 72px;
  height: 54px;
  min-width: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #062E56;
  display: block;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(6, 46, 86, 0.12);
  border: 1px solid #E2E8F0;
}

.vm-popular-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.vm-popular-thumb-wrap:hover .vm-popular-thumb-img {
  transform: scale(1.08);
}

.vm-popular-rank {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Zain', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35);
  z-index: 2;
}

.vm-rank-1 {
  background: #0FA45E;
  color: #062E56;
}

.vm-rank-2,
.vm-rank-3 {
  background: #062E56;
  color: #FFFFFF;
}

.vm-rank-4,
.vm-rank-5 {
  background: rgba(15, 23, 42, 0.85);
  color: #FFFFFF;
  backdrop-filter: blur(2px);
}

.vm-popular-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.vm-popular-cat {
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #0057FF;
  line-height: 1.2;
}

.vm-popular-link {
  font-size: 13.5px;
  font-weight: 700;
  color: #0F172A;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.15s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vm-popular-link:hover {
  color: #0057FF;
}

/* Sidebar Banner (Viaza) */
.vm-sidebar-banner {
  margin-top: 18px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(6, 46, 86, 0.08);
  border: 1px solid #E2E8F0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vm-sidebar-banner:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(6, 46, 86, 0.14);
}

.vm-sidebar-banner a {
  display: block;
}

.vm-sidebar-banner img {
  width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   4. Responsividade
   ========================================================================== */
@media (max-width: 1024px) {
  .vm-category-grid-wrap {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .vm-category-sidebar {
    width: 100%;
    position: static;
    max-width: 600px;
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .vm-category-hero {
    padding: 28px 0 34px;
  }

  .vm-category-posts-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .vm-category-layout {
    padding: 28px 0 44px;
  }
}
