/* ============================================
   KOMPAS4 — Insights Hub CSS
   Article grid, category filter, hub hero
   ============================================ */

/* ─── Hub Hero ─────────────────────────── */
.insights-hero {
  background: var(--navy-900);
  padding: clamp(5rem, 10vw, 7rem) 0 clamp(3rem, 6vw, 4rem);
  position: relative;
  overflow: hidden;
}

.insights-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 80% 50%, rgba(0,155,155,0.10) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 10% 80%, rgba(0,155,155,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.insights-hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  pointer-events: none;
}

.insights-hero-inner {
  position: relative;
  z-index: 1;
}

.insights-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--teal-400);
  margin-bottom: var(--s5);
}

.insights-hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--teal-400);
  border-radius: var(--r-full);
}

.insights-hero h1 {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--weight-bold);
  color: var(--white);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s5);
  max-width: 700px;
}

.insights-hero p {
  font-size: clamp(var(--text-base), 2vw, var(--text-lg));
  color: var(--gray-400);
  max-width: 560px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--s8);
}

/* ─── Search bar ────────────────────────── */
.insights-search-wrap {
  position: relative;
  max-width: 420px;
}

.insights-search-icon {
  position: absolute;
  left: var(--s4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-500);
  pointer-events: none;
}

.insights-search-icon svg {
  width: 18px;
  height: 18px;
}

.insights-search {
  width: 100%;
  padding: var(--s3) var(--s4) var(--s3) calc(var(--s4) + 28px);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-full);
  color: var(--white);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  transition: border-color var(--t-base), background var(--t-base);
  outline: none;
}

.insights-search::placeholder {
  color: var(--gray-500);
}

.insights-search:focus {
  border-color: var(--teal-500);
  background: rgba(255,255,255,0.10);
}

/* ─── Category Filter Tabs ──────────────── */
.insights-filter {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: var(--nav-height);
  z-index: var(--z-raised);
}

.insights-filter-inner {
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0;
}

.insights-filter-inner::-webkit-scrollbar {
  display: none;
}

.filter-btn {
  flex-shrink: 0;
  padding: var(--s4) var(--s5);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--gray-600);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color var(--t-fast), border-color var(--t-fast);
  white-space: nowrap;
  font-family: var(--font-sans);
  margin-bottom: -1px;
}

.filter-btn:hover {
  color: var(--navy-900);
}

.filter-btn.active {
  color: var(--teal-600);
  border-bottom-color: var(--teal-600);
  font-weight: var(--weight-semibold);
}

/* ─── Main Grid Area ────────────────────── */
.insights-main {
  background: var(--gray-50);
  padding: var(--s12) 0 var(--s20);
  min-height: 60vh;
}

/* ─── Featured Article ──────────────────── */
.featured-article {
  background: var(--white);
  border-radius: var(--r-2xl);
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--s12);
  transition: box-shadow var(--t-base), transform var(--t-base);
}

.featured-article:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.featured-article-image {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-900) 100%);
  min-height: 280px;
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: var(--s8);
}

.featured-article-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 30% 20%, rgba(0,155,155,0.20) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 80%, rgba(0,155,155,0.12) 0%, transparent 50%);
  pointer-events: none;
}

.featured-article-image-icon {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.12);
}

.featured-article-image-icon svg {
  width: 32px;
  height: 32px;
  color: var(--teal-400);
}

.featured-article-body {
  padding: var(--s8) var(--s10);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--s4);
}

.featured-label {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--teal-600);
}

.featured-label::before {
  content: '';
  display: block;
  width: 16px;
  height: 2px;
  background: var(--teal-600);
  border-radius: var(--r-full);
}

.featured-article h2 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
}

.featured-article-summary {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: var(--leading-relaxed);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.featured-article-meta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.featured-article-meta-dot {
  width: 3px;
  height: 3px;
  background: var(--gray-300);
  border-radius: var(--r-full);
}

.featured-article-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--teal-600);
  text-decoration: none;
  transition: gap var(--t-fast);
}

.featured-article-link:hover {
  gap: var(--s3);
}

.featured-article-link svg {
  width: 16px;
  height: 16px;
}

/* ─── Article Grid ──────────────────────── */
.article-grid-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--navy-900);
  margin-bottom: var(--s6);
  letter-spacing: var(--tracking-tight);
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s6);
  margin-bottom: var(--s10);
}

/* ─── Article Card ──────────────────────── */
.article-card {
  background: var(--white);
  border-radius: var(--r-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: var(--teal-100);
}

.article-card-thumb {
  background: linear-gradient(135deg, var(--navy-700) 0%, var(--navy-800) 100%);
  height: 140px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.article-card-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 30% 20%, rgba(0,155,155,0.18) 0%, transparent 60%);
}

.article-card-thumb-icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.10);
}

.article-card-thumb-icon svg {
  width: 24px;
  height: 24px;
  color: var(--teal-300);
}

.article-card-body {
  padding: var(--s5) var(--s6);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* ─── Category Badges ───────────────────── */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--s3);
  border-radius: var(--r-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.category-badge--digitalisering { background: #EEF2FF; color: #4338CA; }
.category-badge--erp            { background: #ECFDF5; color: #065F46; }
.category-badge--crm            { background: #FFF7ED; color: #9A3412; }
.category-badge--integrationer  { background: #F0F9FF; color: #0C4A6E; }
.category-badge--automatisering { background: #FDF4FF; color: #6B21A8; }
.category-badge--bi             { background: #FFF1F2; color: #881337; }

.article-card h3 {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--navy-900);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-card-summary {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: var(--leading-normal);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.article-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s4) var(--s6);
  border-top: 1px solid var(--gray-100);
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--text-xs);
  color: var(--gray-500);
}

.article-card-meta svg {
  width: 13px;
  height: 13px;
}

.article-card-cta {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--teal-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--s1);
  transition: gap var(--t-fast);
}

.article-card-cta:hover { gap: var(--s2); }

.article-card-cta svg {
  width: 13px;
  height: 13px;
}

/* ─── No Results ────────────────────────── */
.insights-no-results {
  text-align: center;
  padding: var(--s16) var(--s4);
  color: var(--gray-500);
  font-size: var(--text-base);
}

.insights-no-results svg {
  width: 48px;
  height: 48px;
  color: var(--gray-300);
  margin-bottom: var(--s4);
}

/* ─── Guide Download Section ────────────── */
.insights-guide {
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 100%);
  border-radius: var(--r-2xl);
  padding: var(--s10) var(--s12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  align-items: center;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  overflow: hidden;
}

.insights-guide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 80% at 80% 50%, rgba(0,155,155,0.15) 0%, transparent 60%);
  pointer-events: none;
}

.insights-guide-content {
  position: relative;
  z-index: 1;
}

.insights-guide h2 {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-2xl));
  font-weight: var(--weight-bold);
  color: var(--white);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  margin-bottom: var(--s3);
}

.insights-guide p {
  font-size: var(--text-base);
  color: var(--gray-400);
  line-height: var(--leading-relaxed);
}

.guide-form {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.guide-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s3);
}

.guide-field {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}

.guide-field label {
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--gray-400);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.guide-field input {
  padding: var(--s3) var(--s4);
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--r-md);
  color: var(--white);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  transition: border-color var(--t-base);
  outline: none;
}

.guide-field input::placeholder { color: var(--gray-600); }
.guide-field input:focus { border-color: var(--teal-500); }

.guide-success {
  display: none;
  text-align: center;
  padding: var(--s8);
  color: var(--white);
}

.guide-success svg {
  width: 48px;
  height: 48px;
  color: var(--success);
  margin-bottom: var(--s3);
}

.guide-success h3 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  margin-bottom: var(--s2);
}

.guide-success p {
  color: var(--gray-400);
  font-size: var(--text-sm);
}

/* ─── Newsletter Bar ────────────────────── */
.insights-newsletter {
  margin-top: var(--s10);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--r-xl);
  padding: var(--s6) var(--s8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s6);
}

.insights-newsletter-text p {
  font-size: var(--text-sm);
  color: var(--gray-600);
  margin-top: var(--s1);
}

.insights-newsletter-text strong {
  color: var(--navy-900);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
}

.newsletter-form {
  display: flex;
  gap: var(--s3);
  flex-shrink: 0;
}

.newsletter-input {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--gray-300);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
  min-width: 240px;
  color: var(--gray-900);
  outline: none;
  transition: border-color var(--t-base);
}

.newsletter-input:focus { border-color: var(--teal-500); }

/* ─── Responsive ─────────────────────────── */
@media (max-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .featured-article {
    grid-template-columns: 1fr;
  }

  .featured-article-image {
    min-height: 180px;
  }

  .insights-guide {
    grid-template-columns: 1fr;
    padding: var(--s8);
  }

  .guide-form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .article-grid {
    grid-template-columns: 1fr;
  }

  .insights-newsletter {
    flex-direction: column;
    align-items: flex-start;
  }

  .newsletter-form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter-input {
    min-width: 0;
    width: 100%;
  }
}
