/* hartvaat.nl — Cardiovasculair nieuws voor de Nederlandse zorgprofessional */

/* ── Reset & Base ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue-900: #0F2B3C;
  --blue-800: #1B4965;
  --blue-700: #1E5F8A;
  --blue-600: #2563EB;
  --blue-100: #DBEAFE;
  --blue-50:  #EFF6FF;

  --red-700: #A31621;
  --red-600: #C1272D;
  --red-500: #DC2626;
  --red-100: #FEE2E2;
  --red-50:  #FEF2F2;

  --gray-900: #111827;
  --gray-800: #1F2937;
  --gray-700: #374151;
  --gray-600: #4B5563;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-300: #D1D5DB;
  --gray-200: #E5E7EB;
  --gray-100: #F3F4F6;
  --gray-50:  #F9FAFB;
  --white:    #FFFFFF;

  --cat-cholesterol:       #DC2626;
  --cat-hypertensie:       #2563EB;
  --cat-hartfalen:         #7C3AED;
  --cat-nierziekte:        #059669;
  --cat-atriumfibrilleren: #D97706;
  --cat-preventie:         #0891B2;
  --cat-algemeen:          #475569;

  --font-sans: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', Times, serif;

  --max-w: 1200px;
  --radius: 10px;
  --radius-sm: 6px;

  --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.06), 0 2px 4px -2px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -4px rgba(0,0,0,0.04);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--gray-50);
  line-height: 1.6;
}

a { color: var(--blue-700); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--red-600); }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ─────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 1.25rem; }

/* ── Header ─────────────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--red-600);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 2rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo svg { width: 32px; height: 32px; }

.site-logo .logo-text {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--blue-900);
}
.site-logo .logo-text span { color: var(--red-600); }

.site-nav { display: flex; gap: 0.15rem; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }

.site-nav a {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--gray-600);
  transition: all 0.15s;
}
.site-nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.site-nav a.active { background: var(--blue-900); color: var(--white); }

/* Hamburger button — hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-shrink: 0;
}
.hamburger svg { width: 24px; height: 24px; color: var(--gray-700); }
.hamburger:hover svg { color: var(--gray-900); }

/* ── News ticker ────────────────────────────────────── */
.ticker-bar {
  background: var(--blue-900);
  color: var(--white);
  font-size: 0.8125rem;
  overflow: hidden;
  white-space: nowrap;
}

.ticker-inner {
  display: flex;
  align-items: center;
  height: 36px;
}

.ticker-label {
  background: var(--red-600);
  color: var(--white);
  padding: 0 0.75rem;
  font-weight: 700;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.ticker-track {
  display: flex;
  animation: ticker-scroll 45s linear infinite;
  padding-left: 1rem;
}

.ticker-track:hover { animation-play-state: paused; }

.ticker-item {
  padding: 0 2rem;
  flex-shrink: 0;
}
.ticker-item a { color: rgba(255,255,255,0.9); }
.ticker-item a:hover { color: var(--white); }
.ticker-item .ticker-dot {
  display: inline-block;
  width: 4px;
  height: 4px;
  background: var(--red-500);
  border-radius: 50%;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes ticker-scroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Hero carousel ──────────────────────────────────── */
.hero-carousel {
  border-radius: var(--radius);
  overflow: hidden;
  margin: 2rem 0 0.75rem;
  background: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-800) 100%);
  display: grid;
}

/* All slides stack in the same grid cell — tallest sets the height */
.hero-slide {
  grid-area: 1 / 1;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-content {
  padding: 2.5rem;
}

.hero-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}
.hero-meta {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.75rem;
}
.hero-intro {
  font-size: 1rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
}
.hero-link {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.6rem 1.5rem;
  background: var(--red-600);
  color: var(--white);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.15s;
}
.hero-link:hover { background: var(--red-700); transform: translateY(-1px); }

.hero-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--gray-300);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s;
}
.hero-dot:hover { border-color: var(--blue-600); }
.hero-dot.active {
  background: var(--red-600);
  border-color: var(--red-600);
  transform: scale(1.2);
}

/* ── Section headers ────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gray-200);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title .accent-bar {
  width: 4px;
  height: 1.25rem;
  border-radius: 2px;
  flex-shrink: 0;
}

.section-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--blue-700);
  white-space: nowrap;
}
.section-link:hover { color: var(--red-600); }

/* ── Article cards ──────────────────────────────────── */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 2.4 / 1;
  overflow: hidden;
  background: var(--gray-100);
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.card:hover .card-image-wrap img { transform: scale(1.03); }

/* Accent bar when no image */
.card-accent {
  height: 5px;
  flex-shrink: 0;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-body .cat-badge { margin-bottom: 0.6rem; }

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--red-600); }

.card-meta {
  font-size: 0.75rem;
  color: var(--gray-500);
  margin-bottom: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
}

.card-intro {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.55;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-journal {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--gray-100);
  font-size: 0.75rem;
  color: var(--gray-400);
  font-weight: 500;
}

/* ── Category badge ─────────────────────────────────── */
.cat-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.cat-badge--cholesterol       { background: var(--red-100);  color: var(--cat-cholesterol); }
.cat-badge--hypertensie       { background: var(--blue-100); color: var(--cat-hypertensie); }
.cat-badge--hartfalen         { background: #EDE9FE;         color: var(--cat-hartfalen); }
.cat-badge--nierziekte        { background: #D1FAE5;         color: var(--cat-nierziekte); }
.cat-badge--atriumfibrilleren { background: #FEF3C7;         color: var(--cat-atriumfibrilleren); }
.cat-badge--preventie         { background: #CFFAFE;         color: var(--cat-preventie); }
.cat-badge--algemeen          { background: var(--gray-100); color: var(--cat-algemeen); }

/* ── Stats bar / KPI strip ──────────────────────────── */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.stat-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-xs);
  border-top: 3px solid var(--blue-600);
}
.stat-card:nth-child(2) { border-top-color: var(--red-600); }
.stat-card:nth-child(3) { border-top-color: var(--cat-hartfalen); }
.stat-card:nth-child(4) { border-top-color: var(--cat-nierziekte); }

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1;
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.75rem;
  color: var(--gray-500);
  font-weight: 500;
}

/* ── Article detail page ────────────────────────────── */
.article-detail {
  max-width: 760px;
  margin: 2.5rem auto;
}

.article-detail .cat-badge { margin-bottom: 1rem; }

.article-detail h1 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
  color: var(--gray-900);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.article-detail .article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  font-size: 0.8125rem;
  color: var(--gray-500);
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 2rem;
}

.article-detail .article-meta strong { color: var(--gray-700); font-weight: 600; }

.article-detail .article-hero-image {
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 2 / 1;
}
.article-detail .article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-summary {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--gray-700);
}

.article-summary p { margin-bottom: 1.25rem; }

.source-box {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  background: var(--blue-50);
  border: 1px solid var(--blue-100);
  border-radius: var(--radius);
  border-left: 4px solid var(--blue-600);
}

.source-box p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1rem;
}
.source-box p:last-child { margin-bottom: 0; }

.source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  background: var(--red-600);
  color: var(--white);
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 999px;
  transition: all 0.15s;
  text-decoration: none;
}
.source-btn:hover { background: var(--red-700); color: var(--white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.source-btn svg { width: 18px; height: 18px; }

.article-authors {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.article-authors h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.article-authors p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ── Category page ──────────────────────────────────── */
.category-header {
  padding: 2.5rem 0 2rem;
}
.category-header h1 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 0.5rem;
}
.category-header p {
  font-size: 1.0625rem;
  color: var(--gray-500);
  max-width: 600px;
}

/* ── List view (compact cards) ──────────────────────── */
.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.list-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.list-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.list-card-image {
  width: 200px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--gray-100);
}
.list-card-image img { width: 100%; height: 100%; object-fit: cover; }

.list-card-accent {
  width: 5px;
  flex-shrink: 0;
}

.list-card-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.list-card-body .cat-badge { margin-bottom: 0.5rem; }
.list-card-body .card-title { font-size: 1.1rem; margin-bottom: 0.4rem; }
.list-card-body .card-meta { margin-bottom: 0.4rem; }
.list-card-body .card-intro { -webkit-line-clamp: 2; }

/* ── Video card overlay ────────────────────────────── */
.card--video .card-image-wrap { position: relative; }

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: background 0.2s;
}
.card--video:hover .video-play-overlay { background: rgba(0,0,0,0.35); }

.video-play-btn {
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.card--video:hover .video-play-btn { transform: scale(1.08); }
.video-play-btn svg { width: 22px; height: 22px; margin-left: 2px; }

.video-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--red-100);
  color: var(--red-600);
  margin-bottom: 0.6rem;
}
.video-type-badge svg { width: 12px; height: 12px; }

/* Video detail page */
.video-thumbnail-wrap {
  display: block;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 16 / 9;
  background: var(--gray-900);
  cursor: pointer;
}
.video-thumbnail-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.2s;
}
.video-thumbnail-wrap:hover img { opacity: 0.7; }

.video-play-overlay-lg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-play-btn-lg {
  width: 72px;
  height: 72px;
  background: rgba(255,255,255,0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}
.video-thumbnail-wrap:hover .video-play-btn-lg { transform: scale(1.08); }
.video-play-btn-lg svg { width: 32px; height: 32px; margin-left: 3px; }

.speakers-box {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}
.speakers-box h3 {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}
.speakers-box p {
  font-size: 0.875rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  background: var(--blue-900);
  color: rgba(255,255,255,0.7);
  margin-top: 3rem;
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer-brand .logo-text {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.footer-brand .logo-text span { color: var(--red-500); }
.footer-brand p {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 380px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: rgba(255,255,255,0.6); font-size: 0.875rem; }
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
}

/* ── Back link ──────────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 1.5rem;
}
.back-link:hover { color: var(--blue-700); }
.back-link svg { width: 16px; height: 16px; }

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

@media (max-width: 768px) {
  .header-inner { height: 56px; gap: 0.5rem; }
  .site-logo .logo-text { font-size: 1.15rem; }

  /* Hamburger menu */
  .hamburger { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 0.75rem 1rem;
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--gray-200);
    z-index: 99;
    gap: 0.25rem;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.6rem 1rem; font-size: 0.875rem; border-radius: var(--radius-sm); }

  .hero-carousel { margin: 1.25rem 0 0.5rem; }
  .hero-title { font-size: 1.5rem; }
  .hero-content { padding: 1.5rem; }

  .article-grid { grid-template-columns: 1fr; gap: 1rem; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

  .list-card { flex-direction: column; }
  .list-card-image { width: 100%; height: 160px; }

  .article-detail h1 { font-size: 1.5rem; }
  .article-detail { margin: 1.5rem auto; }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.35rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .stat-card { padding: 1rem; }
  .stat-number { font-size: 1.5rem; }
}
