/*
 * SOVEREIGN INDUSTRIAL CATALOG SYSTEM v1.0
 * Unified architecture for Blogs, Case Studies, and Solutions.
 */

:root {
  /* Core Palette */
  --za-dark:      #02040A;
  --za-dark-soft: #0A0F1E;
  --za-accent:    #3B82F6;
  --za-accent-2:  #22D3EE;
  --za-success:   #10B981;
  --za-bg:        #F8FAFC;
  --za-surface:   #FFFFFF;
  --za-border:    #E2E8F0;
  --za-text-h:    #0F172A;
  --za-text-b:    #334155;
  --za-text-m:    #64748B;

  /* Typography Stacks */
  --f-display: 'Sora', system-ui, sans-serif;
  --f-body:    'Inter', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', monospace;

  /* Shadows */
  --shadow-elite: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ── 1. LAYOUT ── */
.za-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

@media (max-width: 640px) {
  .za-container { padding: 0 20px; }
}

.za-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 40px;
}

/* ── 2. CARDS ── */
.za-card {
  display: flex;
  flex-direction: column;
  background: var(--za-surface);
  border: 1px solid var(--za-border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 10px 24px -4px rgba(0,0,0,0.06);
  height: 100%;
  position: relative;
}

.za-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 25px;
  background: linear-gradient(135deg, transparent 60%, rgba(59,130,246,0.12));
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 0;
}

.za-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 4px 8px rgba(0,0,0,0.06),
    0 24px 48px -8px rgba(0,0,0,0.14);
  border-color: rgba(59,130,246,0.3);
}

.za-card:hover::before { opacity: 1; }

.za-card__media {
  position: relative;
  aspect-ratio: 1200 / 630;
  width: 100%;
  overflow: hidden;
  background: var(--za-dark);
  z-index: 1;
}

.za-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(2,4,10,0.35));
  pointer-events: none;
  z-index: 1;
}

.za-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s;
}

.za-card:hover .za-card__img {
  transform: scale(1.07);
  opacity: 1;
}

.za-card__cat {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 10;
  padding: 5px 11px;
  background: rgba(6, 7, 14, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 7px;
  font-family: var(--f-mono);
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.za-card__content {
  padding: 28px 32px 30px;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.za-card__title {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--za-text-h);
  line-height: 1.22;
  margin-bottom: 14px;
  letter-spacing: -0.03em;
  transition: color 0.2s;
}

.za-card:hover .za-card__title {
  color: var(--za-accent);
}

.za-card__desc {
  font-family: var(--f-body);
  font-size: 0.93rem;
  color: var(--za-text-m);
  line-height: 1.65;
  margin-bottom: 22px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.za-card__footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--za-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.za-card__meta {
  font-family: var(--f-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--za-text-m);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.za-card__arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid rgba(59,130,246,0.2);
  background: rgba(59,130,246,0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--za-accent);
  transition: all 0.3s var(--pb-ease, cubic-bezier(0.16,1,0.3,1));
  flex-shrink: 0;
}

.za-card:hover .za-card__arrow {
  transform: translateX(3px);
  background: var(--za-accent);
  border-color: var(--za-accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}

/* ── 3. CATALOG COMPONENTS ── */
.csi-catalog {
  padding-top: 100px;
  padding-bottom: 160px; /* Deep breathing room for World Class UX */
  background: var(--za-bg);
  position: relative;
  z-index: 1;
}

/* ── 4. ZEN-SOVEREIGN PAGINATION (v1.1) ── */
.za-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 100px;
}

.pagination-btn {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--za-surface);
  border: 1px solid var(--za-border);
  border-radius: 14px;
  color: var(--za-text-m);
  font-family: var(--f-display);
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.pagination-btn:hover {
  transform: translateY(-4px);
  border-color: var(--za-accent);
  color: var(--za-accent);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.1);
}

.pagination-btn.active {
  background: var(--za-accent);
  border-color: var(--za-accent);
  color: #fff;
  box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.3);
  transform: scale(1.1);
}

.pagination-btn.disabled {
  opacity: 0.3;
  pointer-events: none;
  filter: grayscale(1);
}

/* ── 5. HUB HERO (shared by blog, news, certs, playbooks, solutions) ── */
.csi-hero {
  position: relative;
  background: var(--za-dark);
  padding: clamp(7rem, 14vw, 10rem) 0 clamp(4rem, 8vw, 6rem);
  overflow: hidden;
  text-align: center;
}

.csi-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 85%);
  pointer-events: none;
}

.csi-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
}

.csi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1.25rem;
  margin-bottom: 2rem;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--za-accent-2);
}

.csi-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--za-success);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.65);
  animation: hub-pulse 2s ease infinite;
}

@keyframes hub-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
}

.csi-title {
  font-family: var(--f-display);
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.045em;
  color: #fff;
  margin: 0 0 1.25rem;
}

.csi-title em {
  font-style: normal;
  background: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.csi-subtitle {
  font-family: var(--f-body);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  color: #94a3b8;
  line-height: 1.7;
  max-width: 760px;
  margin: 0 auto 2.5rem;
}

.csi-hero__stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
}

.csi-stat {
  text-align: center;
  min-width: 88px;
}

.csi-stat__value {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.03em;
}

.csi-stat__label {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--f-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

/* ── 6. FILTER BRIDGE ── */
.filter-bridge {
  padding-block: 1.25rem;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--za-border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.filter-bar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-label {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--za-text-m);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.filter-pill,
.cert-filter {
  font-size: 0.6875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--za-text-m);
  padding: 0.5rem 1.15rem;
  border-radius: 999px;
  transition: all 0.25s ease;
  text-decoration: none;
  background: #f8fafc;
  border: 1px solid var(--za-border);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-pill:hover,
.filter-pill.active,
.cert-filter:hover,
.cert-filter.active {
  background: var(--za-accent);
  color: #fff;
  border-color: var(--za-accent);
}

.filter-bar__chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.za-dropdown {
  position: relative;
}

.filter-trigger {
  background: #fff;
  border: 1px solid var(--za-border);
  padding: 0.625rem 1.15rem;
  border-radius: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--za-text-h);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.za-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: #fff;
  border: 1px solid var(--za-border);
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.za-dropdown.open .za-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.za-dropdown-header {
  padding: 1rem 1.15rem 0.75rem;
  font-size: 0.625rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--za-text-m);
  border-bottom: 1px solid #f1f5f9;
}

.za-dropdown-scroll {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.za-dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--za-text-h);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.za-dropdown-item:hover,
.za-dropdown-item.active {
  background: #eff6ff;
  color: var(--za-accent);
}

.za-dropdown-badge {
  background: #f1f5f9;
  color: var(--za-text-m);
  font-size: 0.6875rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

/* ── 7. FEATURED NODE ── */
.featured-node {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: var(--za-dark-soft);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  min-height: 420px;
  box-shadow: var(--shadow-elite);
  text-decoration: none;
  transition: all 0.35s ease;
  margin-bottom: 4rem;
}

.featured-node:hover {
  transform: translateY(-6px);
  border-color: var(--za-accent);
  box-shadow: 0 40px 80px -24px rgba(0, 0, 0, 0.45);
}

.featured-node__media {
  position: relative;
  overflow: hidden;
  min-height: 280px;
}

.featured-node__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.88;
  transition: transform 0.6s ease;
}

.featured-node:hover .featured-node__media img {
  transform: scale(1.04);
  opacity: 1;
}

.badge-featured {
  position: absolute;
  top: 1.25rem;
  left: 1.25rem;
  background: var(--za-accent);
  color: #fff;
  font-size: 0.5625rem;
  font-weight: 900;
  padding: 0.4rem 0.85rem;
  border-radius: 4px;
  letter-spacing: 0.12em;
  z-index: 2;
}

.featured-node__content {
  padding: clamp(2rem, 4vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-node__cat {
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--za-accent-2);
  text-transform: uppercase;
  margin-bottom: 1rem;
  letter-spacing: 0.18em;
}

.featured-node__title {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 900;
  color: #fff;
  margin-bottom: 1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.featured-node__desc {
  font-size: 1rem;
  color: #94a3b8;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.featured-node__cta {
  font-size: 0.8125rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.pattern-fallback {
  width: 100%;
  height: 100%;
  min-height: 220px;
  background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}

.hub-catalog__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--za-border);
}

.hub-catalog__title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 900;
  color: var(--za-text-h);
  margin: 0;
  letter-spacing: -0.03em;
}

.hub-catalog__meta {
  font-family: var(--f-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--za-text-m);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-empty {
  text-align: center;
  padding: 6rem 1rem;
}

.hub-empty__title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--za-text-h);
  margin-bottom: 0.75rem;
}

.hub-empty__text {
  color: var(--za-text-m);
  margin-bottom: 1.5rem;
}

/* ── 8. CERTIFICATES HUB ── */
.cert-section {
  margin-bottom: 4rem;
}

.cert-section__title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--za-text-h);
  margin: 0 0 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--za-border);
  letter-spacing: -0.02em;
}

.cert-card {
  display: flex;
  flex-direction: column;
  background: var(--za-surface);
  border: 1px solid var(--za-border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: var(--shadow-elite);
  height: 100%;
  cursor: pointer;
}

.cert-card:hover {
  transform: translateY(-8px);
  border-color: var(--za-accent);
  box-shadow: var(--shadow-hover);
}

.cert-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  background: #f1f5f9;
  overflow: hidden;
}

.cert-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.cert-card__media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

.cert-card__body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.cert-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.cert-card__issuer {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.65rem 0.2rem 0.2rem;
  border-radius: 999px;
  border: 1px solid var(--za-border);
  background: #f8fafc;
  font-size: 0.625rem;
  font-weight: 800;
  color: #475569;
  text-transform: uppercase;
}

.cert-card__issuer img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: contain;
  background: #fff;
}

.cert-card__year {
  font-size: 0.8125rem;
  font-weight: 700;
  color: #94a3b8;
}

.cert-card__title {
  font-family: var(--f-display);
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--za-text-h);
  line-height: 1.35;
  margin: 0 0 1rem;
}

.cert-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--za-accent);
}

.cert-filter__logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
  border-radius: 50%;
  background: #fff;
}

@media (max-width: 1024px) {
  .featured-node {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .za-dropdown-menu {
    width: 100%;
    right: auto;
    left: 0;
  }
}
